On the Editor select event I want to move the cursor to the next range depending upon specific criteria. I've seen this link but didnt do what I wanted.
Basically I'm using the snippets functionality of Editor control to add MergeFields into the HTML. The snippet looks like this:
>[[Merge Field 1]]</
When a uses selects this MergeField i.e. places the cursor in it I detect it in the select event then I want to programatically move the cursor into the next range (or after the merge span) so that the user cant mess with the merge fields. How do I move cursor to next range or end of MergeField span?
The function is below:
editor = $(
selection = editor.getSelection();
range = editor.getRange();
startNode = range.startContainer;
(startNode.parentElement && startNode.parentElement.id ===
'Im a Merge Field!'
//Move cursor to after the MergeField span.