Plugin Html - HtmlEditor content not saved in module edition
rohsyl opened this issue · 1 comments
rohsyl commented
In module mode, the htmleditor content is not saved
It's because Codemirror don't keep in sync the textarea and the code editor. So when getting the content of the textarea in javascript (when saving the module) the content is always empty.
Possible solutions
- Switch to ace editor
- Manually put an event listener on the codemirror editor and update the textarea after each change
- In js when saving the module, detect that the textarea is a codemirror and then update manually the textarea
rohsyl commented
Solution done:
In js when saving the module, detect that the textarea is a codemirror and then update manually the textarea