Skip to content

Commit

Permalink
Bugfix for multiple wysiwyg instances
Browse files Browse the repository at this point in the history
  • Loading branch information
sippsolutions committed Apr 12, 2019
1 parent 6279011 commit 113934f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions view/adminhtml/web/js/page_designer.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ define([
* @param {Function} callback
*/
"onColumnContentSet": function (column, currentContent, callback) {
// remove old editors
$.each(tinyMCE.editors, function (i, editor) {
if (editor && !document.getElementById(editor.id)) {
editor.remove();
}
});

// set editor as a block element to be able to access it
var wysControl = jElement.parent().find('.admin__control-wysiwig').parent();
if (wysControl.is(':hidden')) {
Expand Down

0 comments on commit 113934f

Please sign in to comment.