liferay / liferay-ckeditor

Other
8 stars 49 forks source link

fix: enable line wrapping in codemirror plugin #132

Closed julien closed 4 years ago

julien commented 4 years ago

This solves the issue described in LPS-120594, where occasionally the editor's source mode (now handled by the codemirror plugin) grows depending on the text that is in the editor.

Here's a screenshot of what it looked like before this change:

And here's a screenshot of what it looks like after this change:

Test plan:

Another thought I had, is that if we were using ES6 in CKEDITOR plugins, we could possibly add the CodeMirror options in a separate file to make sure both editor (the one in codemirror plugin and the one in codemirrordialog) always have the same options - but I'm not ready yet (and who knows what could happen if we decided to build CKEDITOR with ES6)

julien commented 4 years ago

p.s. Please don't merge this yet, as I'm fixing some similar issue in the dialog as commented in #133

julien commented 4 years ago

In 836ffcb I also fixed the dialog's height which looks a bit better, but I still need to take care of "autowrapping" the text in there too

julien commented 4 years ago

7acbcee adds text wrapping in the codemirrordialog too

julien commented 4 years ago

Now resolving conflicts due to the changes in #131

julien commented 4 years ago

~I still need to remove duplicated code here so I'll add another commit~ never mind I already had done that