Skip to content

Commit 9a998de

Browse files
MAGETWO-52378: [GitHub] WYSIWYG Editor strips empty HTML codes out #4324
1 parent a566f6f commit 9a998de

File tree

1 file changed

+11
-1
lines changed
  • lib/web/mage/adminhtml/wysiwyg/tiny_mce

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ define([
101101
magentoPluginsOptions: magentoPluginsOptions,
102102
doctype: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
103103
setup: function(ed){
104+
ed.onPreInit.add(self.onEditorPreInit.bind(self));
105+
104106
ed.onInit.add(self.onEditorInit.bind(self));
105107

106108
ed.onSubmit.add(function(ed, e) {
@@ -285,10 +287,18 @@ define([
285287
}
286288
},
287289

288-
onEditorInit: function (editor) {
290+
/**
291+
* Editor pre-initialise event handler.
292+
*/
293+
onEditorPreInit: function (editor) {
289294
this.applySchema(editor);
290295
},
291296

297+
/**
298+
* @deprecated
299+
*/
300+
onEditorInit: function () {},
301+
292302
onFormValidation: function() {
293303
if (tinyMCE.get(this.id)) {
294304
$(this.id).value = tinyMCE.get(this.id).getContent();

0 commit comments

Comments
 (0)