mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
Allow autoinsert to work in IE11
This commit is contained in:
parent
67b39cf5d0
commit
6a4131ffd3
1 changed files with 6 additions and 1 deletions
|
|
@ -31,7 +31,12 @@
|
|||
var sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
document.execCommand('insertHTML', false, content);
|
||||
if (String(navigator.userAgent).match(/Trident\/7/)) {
|
||||
range.insertNode(range.createContextualFragment(content));
|
||||
range.collapse(false);
|
||||
} else {
|
||||
document.execCommand('insertHTML', false, content);
|
||||
}
|
||||
};
|
||||
|
||||
// Simplify HTML content by removing unnecessary tags.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue