Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.39k stars 316 forks source link

Typing change to toolbar option is breaking existing code #178

Closed FranklinWhale closed 4 years ago

FranklinWhale commented 4 years ago

Describe the bug The typing change from toolbar?: boolean | ReadonlyArray<string | ToolbarIcon>; to toolbar?: boolean | ReadonlyArray<'|' | ToolbarButton | ToolbarIcon | ToolbarDropdownIcon>; in 2.10.0 breaks existing code that uses string array.

For example,

new EasyMDE({
    toolbar: [
        "bold",
        "italic",
        "heading",
        "|",
        "quote",
        "unordered-list",
        "ordered-list",
        "table",
        "|",
        "link"
    ]
});

Expected behavior The code should be compiled successfully.

Version information

Ionaru commented 4 years ago

Fixed in version 2.10.1