You add a markdown editor to a form. It looks great. Then someone reports that the submit button does nothing, and you spend an afternoon finding out why.
Here's the form before the editor:
<form method= "post" > <textarea id= "content" name= "content" required ></textarea> <button> Publish </button> </form>
Enter fullscreen mode
Exit fullscreen mode
That required works. The browser blocks submission on an empty field and shows its own message.
Now add almost any markdown editor. The library hides your textarea, builds a contenteditable div next to it, and edits that instead. Your textarea is still in the DOM, still required , and still empty, because nobody has typed into it. The browser refuses to submit a form containing an invalid field it cannot show you, and you get no error, no focus ring, nothing.
What else breaks
The empty textarea is the obvious symptom. The rest surface later.
FormData reads nothing.…