Browse Source

BI-25467

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

7
src/case/richeditor/niceditor/niceditor.js

@ -307,10 +307,10 @@
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 {
if (range.insertNode) {
// IE // IE
range.deleteContents(); range.deleteContents();
range.insertNode($(html)[0]); range.insertNode($(html)[0]);
@ -318,6 +318,7 @@
// IE <= 10 // IE <= 10
range.pasteHTML(html); range.pasteHTML(html);
} }
}
}, },
nicCommand: function (cmd, args) { nicCommand: function (cmd, args) {

Loading…
Cancel
Save