|
|
@ -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); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|