Hi All! I need to add a span at caret position in my application. I could add span at caret position with following code, but could not position the caret inside it, so that if user types in it will go inside the new span.
marker = ed.selection.getBookmark();
ed.selection.moveToBookmark(marker);
tinyMCE.execCommand('mceInsertContent',false,'<span id="mytitle"></span>');
ed.selection.moveToBookmark(marker);
I have spent 1and 1/2 day for this. Kindly suggest. Thanks in advance.