Skip to content

Commit 60b8c5a

Browse files
author
Olexandr Lysenko
committed
Merge remote-tracking branch 'origin/MAGETWO-52378' into bugfixes
2 parents 10ff4f8 + 9a998de commit 60b8c5a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/web/mage/adminhtml/wysiwyg/tiny_mce/html5-schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ define([
4646
};
4747

4848
schema.flowContent = schema.blockContent.concat(schema.phrasingContent, ['style']);
49-
schema.nonEmpty = ['td', 'th', 'iframe', 'video', 'audio', 'object', 'script'].concat(schema.shortEnded);
49+
schema.nonEmpty = ['td', 'th', 'iframe', 'video', 'audio', 'object', 'script', 'i', 'em', 'span'].concat(schema.shortEnded);
5050

5151
_.extend(schema, (function (phrasingContent, flowContent) {
5252
var validElements = [],

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)