mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-04 00:24:29 -06:00
Fixed typescript error when entering certain strings for toolbar buttons
Closes #178
This commit is contained in:
parent
bcb1f7dfbd
commit
cc65563714
@ -4,7 +4,10 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
<!--## [Unreleased]-->
|
## [Unreleased]
|
||||||
|
### Fixed
|
||||||
|
- Typescript error when entering certain strings for toolbar buttons ([#178]).
|
||||||
|
|
||||||
## [2.10.0] - 2020-04-02
|
## [2.10.0] - 2020-04-02
|
||||||
### Added
|
### Added
|
||||||
- `inputStyle` and `nativeSpellcheck` options to manage the native language of the browser (Thanks to [@firm1], [#143]).
|
- `inputStyle` and `nativeSpellcheck` options to manage the native language of the browser (Thanks to [@firm1], [#143]).
|
||||||
@ -141,6 +144,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
|
|||||||
- Cursor not always showing in "text" mode over the edit field
|
- Cursor not always showing in "text" mode over the edit field
|
||||||
|
|
||||||
<!-- Linked issues -->
|
<!-- Linked issues -->
|
||||||
|
[#178]: https://github.com/Ionaru/easy-markdown-editor/issues/178
|
||||||
[#126]: https://github.com/Ionaru/easy-markdown-editor/issues/126
|
[#126]: https://github.com/Ionaru/easy-markdown-editor/issues/126
|
||||||
[#99]: https://github.com/Ionaru/easy-markdown-editor/issues/99
|
[#99]: https://github.com/Ionaru/easy-markdown-editor/issues/99
|
||||||
[#45]: https://github.com/Ionaru/easy-markdown-editor/issues/45
|
[#45]: https://github.com/Ionaru/easy-markdown-editor/issues/45
|
||||||
|
@ -163,7 +163,7 @@ const editorImagesCustom = new EasyMDE({
|
|||||||
syncSideBySidePreviewScroll: true
|
syncSideBySidePreviewScroll: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const editorAutosave = new EasyMDE({
|
new EasyMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
delay: 2000,
|
delay: 2000,
|
||||||
@ -178,3 +178,18 @@ const editorAutosave = new EasyMDE({
|
|||||||
text: 'Stored: ',
|
text: 'Stored: ',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
new EasyMDE({
|
||||||
|
toolbar: [
|
||||||
|
'bold',
|
||||||
|
'italic',
|
||||||
|
'heading',
|
||||||
|
'|',
|
||||||
|
'quote',
|
||||||
|
'unordered-list',
|
||||||
|
'ordered-list',
|
||||||
|
'table',
|
||||||
|
'|',
|
||||||
|
'link'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
11
types/easymde.d.ts
vendored
11
types/easymde.d.ts
vendored
@ -27,7 +27,14 @@ interface ArrayOneOrMore<T> extends Array<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ToolbarButton =
|
type ToolbarButton =
|
||||||
'strikethrough'
|
'bold'
|
||||||
|
| 'italic'
|
||||||
|
| 'quote'
|
||||||
|
| 'unordered-list'
|
||||||
|
| 'ordered-list'
|
||||||
|
| 'link'
|
||||||
|
| 'image'
|
||||||
|
| 'strikethrough'
|
||||||
| 'code'
|
| 'code'
|
||||||
| 'table'
|
| 'table'
|
||||||
| 'redo'
|
| 'redo'
|
||||||
@ -172,7 +179,7 @@ declare namespace EasyMDE {
|
|||||||
promptURLs?: boolean;
|
promptURLs?: boolean;
|
||||||
renderingConfig?: RenderingOptions;
|
renderingConfig?: RenderingOptions;
|
||||||
shortcuts?: Shortcuts;
|
shortcuts?: Shortcuts;
|
||||||
showIcons?: ReadonlyArray<string>;
|
showIcons?: ReadonlyArray<ToolbarButton>;
|
||||||
spellChecker?: boolean;
|
spellChecker?: boolean;
|
||||||
inputStyle?: 'textarea' | 'contenteditable';
|
inputStyle?: 'textarea' | 'contenteditable';
|
||||||
nativeSpellcheck?: boolean;
|
nativeSpellcheck?: boolean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user