Skip to content

Commit e40df5d

Browse files
committed
Merge branch 'MC-17574' of https://github.com/magento-tango/magento2ce into pr_2019_07_11
2 parents a9eb7d8 + 1c2abae commit e40df5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,22 @@ define([
484484
* @return {Boolean}
485485
*/
486486
toggle: function () {
487+
var content;
488+
487489
if (!tinyMCE4.get(this.getId())) {
488490
this.turnOn();
489491

490492
return true;
491493
}
494+
495+
content = this.get(this.getId()) ? this.get(this.getId()).getContent() : this.getTextArea().val();
496+
492497
this.turnOff();
493498

499+
if (content.match(/{{.+?}}/g)) {
500+
this.getTextArea().val(content.replace(/"/g, '"'));
501+
}
502+
494503
return false;
495504
},
496505

0 commit comments

Comments
 (0)