In IE11 and FF (at least), using insertElement closes and reopens tags if the cursor is inbetween a tag such as <P>Sample *cursor* Text</P>
Expected: <P>Sample <div class="A"></div> Text</P>
Actual: <P>Sample </P><div class="A"></div> <P>Text</P>
Code from custom plugin:
onOk: function () {var div = CKEDITOR.dom.element.createFromHtml('<div class="A"></div>', editor.document);
editor.insertElement(div);
}
What is the proper way to insert an element without affecting surrounding HTML? Using 4.3.3