I am trying to integrate your editor to phpbb. I want to move cursor between empty bbcode just after insertion. for example click on a [bbbcode] button to insert [bbbcode][/bbbcode] to editor.
when I use bookmarking:
ed.selection.setContent('[bbbcode]');
p = ed.selection.getBookmark();
ed.selection.setContent('[/bbbcode]');
ed.selection.moveToBookmark(p);
this will remove last part ( [/bbbcode] ) from the final source when I POST it.
editor shows last part but when post content to server last part ( [/bbbcode] ) is missed because of bookmark moving.
is there any way to move cursor with bookmarking?
I would like to insert [bbbcode][/bbbcode] and move cursor here:
[bbbcode]here[/bbbcode]
You should insert something like
[bbbcode]<span id="marker">.</span>[/bbbcode].After insertion you select and remove the span-element: