Skip to content

Commit

Permalink
Use wysiwygAdapter instead of global tinyMCE variable
Browse files Browse the repository at this point in the history
I realised that tinyMCE is already being required as the wysiwygAdapter, so I've updated the code to point to that dependency instead. Still works.
  • Loading branch information
molovo authored Jan 17, 2019
1 parent 3bcf0d8 commit d4e0c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/web/mage/adminhtml/wysiwyg/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ define([
parameters: params,
onComplete: function (transport) {
try {
editor = tinyMCE.get(this.widgetTargetId);
editor = wysiwyg.get(this.widgetTargetId);

widgetTools.onAjaxSuccess(transport);
widgetTools.dialogWindow.modal('closeModal');
Expand Down Expand Up @@ -513,7 +513,7 @@ define([
* @return {null|wysiwyg.Editor|*}
*/
getWysiwyg: function () {
return tinyMCE.get(this.widgetTargetId);
return wysiwyg.get(this.widgetTargetId);
},

/**
Expand Down

0 comments on commit d4e0c28

Please sign in to comment.