Add documentation and typings

pull/267/head
Jeroen Akkerman 4 years ago
parent 65186e4537
commit b06d1fe67f

@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added ### Added
- CodeMirror autorefresh plugin and autoRefresh option (Thanks to [@mbolli], [#249]). - CodeMirror autorefresh plugin and autoRefresh option (Thanks to [@mbolli], [#249]).
- `lineNumbers` option to display line numbers in the editor (Thanks to [@nhymxu], [#267]).
### Fixed ### Fixed
- CSS scoping issues when the editor is used in combination with other CodeMirror instances ([#252]). - CSS scoping issues when the editor is used in combination with other CodeMirror instances ([#252]).
@ -195,6 +196,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
[#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9 [#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9
<!-- Linked PRs --> <!-- Linked PRs -->
[#267]: https://github.com/Ionaru/easy-markdown-editor/pull/267
[#249]: https://github.com/Ionaru/easy-markdown-editor/pull/249 [#249]: https://github.com/Ionaru/easy-markdown-editor/pull/249
[#244]: https://github.com/Ionaru/easy-markdown-editor/pull/244 [#244]: https://github.com/Ionaru/easy-markdown-editor/pull/244
[#235]: https://github.com/Ionaru/easy-markdown-editor/pull/235 [#235]: https://github.com/Ionaru/easy-markdown-editor/pull/235
@ -229,6 +231,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
[#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19 [#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19
<!-- Linked users --> <!-- Linked users -->
[@nhymxu]: https://github.com/nhymxu
[@mbolli]: https://github.com/mbolli [@mbolli]: https://github.com/mbolli
[@ivictbor]: https://github.com/ivictbor [@ivictbor]: https://github.com/ivictbor
[@JoshuaLicense]: https://github.com/JoshuaLicense [@JoshuaLicense]: https://github.com/JoshuaLicense

@ -142,6 +142,7 @@ easyMDE.value('New input for **EasyMDE**');
- image - image
- link - link
- table - table
- **lineNumbers**: If set to `true`, enables line numbers in the editor.
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`. - **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
- **minHeight**: Sets the minimum height for the composition area, before it starts auto-growing. Should be a string containing a valid CSS value like `"500px"`. Defaults to `"300px"`. - **minHeight**: Sets the minimum height for the composition area, before it starts auto-growing. Should be a string containing a valid CSS value like `"500px"`. Defaults to `"300px"`.
- **maxHeight**: Sets fixed height for the composition area. `minHeight` option will be ignored. Should be a string containing a valid CSS value like `"500px"`. Defaults to `undefined`. - **maxHeight**: Sets fixed height for the composition area. `minHeight` option will be ignored. Should be a string containing a valid CSS value like `"500px"`. Defaults to `undefined`.

@ -169,6 +169,7 @@ const editorImagesCustom = new EasyMDE({
new EasyMDE({ new EasyMDE({
sideBySideFullscreen: true, sideBySideFullscreen: true,
lineNumbers: false,
autosave: { autosave: {
enabled: true, enabled: true,
delay: 2000, delay: 2000,
@ -186,6 +187,7 @@ new EasyMDE({
new EasyMDE({ new EasyMDE({
sideBySideFullscreen: false, sideBySideFullscreen: false,
lineNumbers: true,
maxHeight: '500px', maxHeight: '500px',
toolbar: [ toolbar: [
'bold', 'bold',

@ -176,6 +176,7 @@ declare namespace EasyMDE {
indentWithTabs?: boolean; indentWithTabs?: boolean;
initialValue?: string; initialValue?: string;
insertTexts?: InsertTextOptions; insertTexts?: InsertTextOptions;
lineNumbers?: boolean;
lineWrapping?: boolean; lineWrapping?: boolean;
minHeight?: string; minHeight?: string;
maxHeight?: string; maxHeight?: string;

Loading…
Cancel
Save