From 8611d14d2cd91683348d4df075e1ba7df6171a0d Mon Sep 17 00:00:00 2001 From: Nazarn96 Date: Fri, 5 Apr 2019 13:13:52 +0300 Subject: [PATCH] WYSIWYG Image-Popup is not working correctly with multipleEditors --- lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js index ed105bd2c18f5..604988588aac5 100755 --- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js +++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js @@ -238,12 +238,16 @@ define([ * @param {Object} o */ openFileBrowser: function (o) { + var targetElementID = tinymce.activeEditor.getElement().getAttribute('id'); + var originId = this.id; + this.initialize(targetElementID, this.config); + var typeTitle, storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0, frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'), wUrl = this.config['files_browser_window_url'] + - 'target_element_id/' + this.id + '/' + - 'store/' + storeId + '/'; + 'target_element_id/' + this.id + '/' + + 'store/' + storeId + '/'; this.mediaBrowserOpener = o.win; this.mediaBrowserTargetElementId = o.field; @@ -255,6 +259,8 @@ define([ typeTitle = this.translate('Insert File...'); } + this.initialize(originId, this.config); + frameDialog.hide(); jQuery('#mceModalBlocker').hide();