Browse Source

Add missing configuration options

Fixes #126
master
Jeroen Akkerman 1 month ago
parent
commit
e9e5bef137
5 changed files with 42 additions and 4 deletions
  1. 8
    1
      CHANGELOG.md
  2. 6
    0
      package-lock.json
  3. 1
    0
      package.json
  4. 15
    2
      types/easymde-test.ts
  5. 12
    1
      types/easymde.d.ts

+ 8
- 1
CHANGELOG.md View File

@@ -4,7 +4,11 @@ All notable changes to easymde will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!--## [Unreleased]-->
## [Unreleased]
### Added
- Missing minHeight option in type definition (Thanks to [@t49tran], [#123]).
- Other missing type definitions ([#126]).

## [2.8.0] - 2019-08-20
### Added
- Upload images functionality (Thanks to [@roipoussiere] and [@JeroenvO], [#71], [#101]).
@@ -119,6 +123,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
- Cursor not always showing in "text" mode over the edit field

<!-- Linked issues -->
[#126]: https://github.com/Ionaru/easy-markdown-editor/issues/126
[#99]: https://github.com/Ionaru/easy-markdown-editor/issues/99
[#45]: https://github.com/Ionaru/easy-markdown-editor/issues/45
[#44]: https://github.com/Ionaru/easy-markdown-editor/issues/44
@@ -131,6 +136,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
[#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9

<!-- Linked PRs -->
[#123]: https://github.com/Ionaru/easy-markdown-editor/pull/123
[#109]: https://github.com/Ionaru/easy-markdown-editor/pull/109
[#106]: https://github.com/Ionaru/easy-markdown-editor/pull/106
[#101]: https://github.com/Ionaru/easy-markdown-editor/pull/101
@@ -144,6 +150,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
[#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19

<!-- Linked users -->
[@t49tran]: https://github.com/t49tran
[@richtera]: https://github.com/richtera
[@jfly]: https://github.com/jfly
[@sperezp]: https://github.com/sperezp

+ 6
- 0
package-lock.json View File

@@ -39,6 +39,12 @@
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
"dev": true
},
"@types/marked": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.6.5.tgz",
"integrity": "sha512-6kBKf64aVfx93UJrcyEZ+OBM5nGv4RLsI6sR1Ar34bpgvGVRoyTgpxn4ZmtxOM5aDTAaaznYuYUH8bUX3Nk3YA==",
"dev": true
},
"@types/tern": {
"version": "0.23.3",
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz",

+ 1
- 0
package.json View File

@@ -25,6 +25,7 @@
},
"devDependencies": {
"@types/codemirror": "0.0.76",
"@types/marked": "^0.6.5",
"browserify": "^16.5.0",
"gulp": "^4.0.2",
"gulp-clean-css": "^4.2.0",

+ 15
- 2
types/easymde-test.ts View File

@@ -121,5 +121,18 @@ const editorImagesCustom = new EasyMDE({
},
errorCallback: errorMessage => {
console.error(errorMessage);
}
});
},
renderingConfig: {
codeSyntaxHighlighting: true,
markedOptions: {
silent: true,
highlight(code: string, lang: string, callback?: (error: (any | undefined), code: string) => void): string {
return 'something'
},
},
},
promptTexts: {
image: 'Insert URL'
},
syncSideBySidePreviewScroll: true
});

+ 12
- 1
types/easymde.d.ts View File

@@ -20,6 +20,7 @@
// SOFTWARE.

/// <reference types="codemirror"/>
/// <reference types="marked"/>

declare namespace EasyMDE {
interface AutoSaveOptions {
@@ -47,9 +48,16 @@ declare namespace EasyMDE {
underscoresBreakWords?: boolean;
}

interface PromptTexts {
image?: string;
link?: string;
}

interface RenderingOptions {
codeSyntaxHighlighting?: boolean;
hljs?: any;
markedOptions?: marked.MarkedOptions;
singleLineBreaks?: boolean;
codeSyntaxHighlighting: boolean;
}

interface Shortcuts {
@@ -141,6 +149,9 @@ declare namespace EasyMDE {
imageTexts?: ImageTextsOptions;
errorMessages?: ImageErrorTextsOptions;
errorCallback?: (errorMessage: string) => void;

promptTexts?: PromptTexts;
syncSideBySidePreviewScroll?: boolean;
}
}


Loading…
Cancel
Save