mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 15:44:28 -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/),
|
||||
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
|
||||
### Added
|
||||
- `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
|
||||
|
||||
<!-- Linked issues -->
|
||||
[#178]: https://github.com/Ionaru/easy-markdown-editor/issues/178
|
||||
[#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
|
||||
|
@ -163,7 +163,7 @@ const editorImagesCustom = new EasyMDE({
|
||||
syncSideBySidePreviewScroll: true
|
||||
});
|
||||
|
||||
const editorAutosave = new EasyMDE({
|
||||
new EasyMDE({
|
||||
autosave: {
|
||||
enabled: true,
|
||||
delay: 2000,
|
||||
@ -178,3 +178,18 @@ const editorAutosave = new EasyMDE({
|
||||
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 =
|
||||
'strikethrough'
|
||||
'bold'
|
||||
| 'italic'
|
||||
| 'quote'
|
||||
| 'unordered-list'
|
||||
| 'ordered-list'
|
||||
| 'link'
|
||||
| 'image'
|
||||
| 'strikethrough'
|
||||
| 'code'
|
||||
| 'table'
|
||||
| 'redo'
|
||||
@ -172,7 +179,7 @@ declare namespace EasyMDE {
|
||||
promptURLs?: boolean;
|
||||
renderingConfig?: RenderingOptions;
|
||||
shortcuts?: Shortcuts;
|
||||
showIcons?: ReadonlyArray<string>;
|
||||
showIcons?: ReadonlyArray<ToolbarButton>;
|
||||
spellChecker?: boolean;
|
||||
inputStyle?: 'textarea' | 'contenteditable';
|
||||
nativeSpellcheck?: boolean;
|
||||
|
Loading…
x
Reference in New Issue
Block a user