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.41k stars 316 forks source link

Fix unused `iconClassMap` option #501

Open MrMicky-FR opened 2 years ago

MrMicky-FR commented 2 years ago

Currently the iconClassMap option has absolutely no effects, because the values of the built-in iconClassMap variable are directly inlined in the toolbarBuiltInButtons during script initialization which occurs before the constructor call where options are passed.

This PR changes this, by using options.iconClassMap during toolbar creation, which occurs in constructor call

MrMicky-FR commented 1 year ago

Hi @Ionaru, do you think you could look at this when you have some time ? Because currently the iconClassMap option isn’t working, and this PR fixes this issues and introduced no breaking changes, and the test are passing. Thanks a lot :)