This is my try.
tinymce.init({
...
});
var frame2 = '<p><div>some text<div/></p>';
tinymce.execCommand('mceInsertContent',false,frame2);
out put view on preview
<div>some text</div>
As you can see the output is wrong. The desired output is below, which is p tag wraps div which wraps the text.
<p><div>some text<div></p>
What am I missing here?
` is incorrect HTML and therefore will be sanitized by TinyMce. So the output is correct!