Closed spencertweedy closed 4 years ago
It appears that forceSync does immediately sync the EasyMDE content into the original textarea, but for some reason it doesn't fire any events on the original textarea.
I have a StimulusJS controller listening to "change" events on the original textarea and the change event isn't firing when EasyMDE syncs its contents into the textarea.
Why is closed?
@spencertweedy I had the same problem as you, how did you solve it?
A workaround that works for me:
new EasyMDE({
element: ...,
forceSync: true
}).codemirror.on('change', (e) => {
$(e.getTextArea()).trigger('change');
});
Describe the bug forceSync doesn't store the EasyMDE editor's value in the original textarea.
To Reproduce See this Glitch.