Browse Source

BI-25467

es6
fay 7 years ago
parent
commit
1222fc1fed
  1. 19
      src/case/richeditor/niceditor/niceditor.js

19
src/case/richeditor/niceditor/niceditor.js

@ -307,16 +307,17 @@
insertHTML: function (html) { insertHTML: function (html) {
var range = this.getRng(); var range = this.getRng();
if (document.queryCommandState("insertHTML")) { try {
// W3C
this.nicCommand("insertHTML", html); this.nicCommand("insertHTML", html);
} else if (range.insertNode) { } finally {
// IE if (range.insertNode) {
range.deleteContents(); // IE
range.insertNode($(html)[0]); range.deleteContents();
} else if (range.pasteHTML) { range.insertNode($(html)[0]);
// IE <= 10 } else if (range.pasteHTML) {
range.pasteHTML(html); // IE <= 10
range.pasteHTML(html);
}
} }
}, },

Loading…
Cancel
Save