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
Branches
Tags
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 ...@@ -45,7 +45,7 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
return; return;
} }
try{ try {
const editor = await ClassicEditor const editor = await ClassicEditor
.create(prop.querySelector('textarea'), { .create(prop.querySelector('textarea'), {
// use all plugins since we built the editor dependency to // 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 ...@@ -65,7 +65,7 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
editor.model.document.on("change:data", (e) => { editor.model.document.on("change:data", (e) => {
editor.updateSourceElement(); editor.updateSourceElement();
}); });
} catch(error) { } catch (error) {
logger.error(error.stack); logger.error(error.stack);
} }
} }
...@@ -82,6 +82,11 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g ...@@ -82,6 +82,11 @@ var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, g
} }
var init = function () { 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 // Insert an editor into all TEXT properties of the entity which is
// being edited. // being edited.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment