sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.8k stars 1.12k forks source link

Add role="button" to toolbar buttons #734

Open MichalRemis opened 5 years ago

MichalRemis commented 5 years ago

Please add role="button" to toolbar buttons. Otherwise they are by default treated as submit buttons which causes weird behaviour when SimpleMDE is inside a form with other inputs. Instead on submitting the form when I press <enter>, first button (SimpleMDE's bold button) is pressed.

See this fiddle: https://jsfiddle.net/ge9hfkaL/2/