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.32k stars 308 forks source link

Disable undo and redo toolbar buttons depending on history #525

Open sn3p opened 1 year ago

sn3p commented 1 year ago

The undo and redo buttons are currently always enabled when present in the toolbar, even when there is no history. Would it be a feature to listen to changes and enable/disable the buttons depending on the history?

https://user-images.githubusercontent.com/935529/213391633-e48ac603-7d28-4f59-878d-90bc966f2463.mov

Demo: https://codepen.io/snap/pen/dyjRRwr?editors=1010