rohsyl/omega-l

Plugin Html - HtmlEditor content not saved in module edition

Closed this issue · 1 comments

In module mode, the htmleditor content is not saved

image

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

Solution done:
In js when saving the module, detect that the textarea is a codemirror and then update manually the textarea