Browse Source

BI-25467

es6
fay 6 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) {
var range = this.getRng();
if (document.queryCommandState("insertHTML")) {
// W3C
try {
this.nicCommand("insertHTML", html);
} else if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
} finally {
if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
}
}
},

Loading…
Cancel
Save