Skip to content
Snippets Groups Projects
Commit ebdc1436 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

FIX: Replace text areas if edit mode is already open

parent a20fdf4a
No related branches found
No related tags found
2 merge requests!68DOC: update CHANGELOG,!61FIX: Replace text areas if edit mode is already open
Pipeline #17171 passed
......@@ -45,7 +45,7 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
return;
}
try{
try {
const editor = await ClassicEditor
.create(prop.querySelector('textarea'), {
// use all plugins since we built the editor dependency to
......@@ -65,7 +65,7 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
editor.model.document.on("change:data", (e) => {
editor.updateSourceElement();
});
} catch(error) {
} catch (error) {
logger.error(error.stack);
}
}
......@@ -82,6 +82,11 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
}
var init = function () {
if (edit_mode.app.entity) {
// replace text areas if we're already in the edit mode and all
// events did fire already.
replaceTextAreas(edit_mode.app.entity);
}
// Insert an editor into all TEXT properties of the entity which is
// being edited.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment