Home › Forums › General XMetaL Discussion › Move cursor inside node from selection › Reply To: Move cursor inside node from selection
Reply to: Move cursor inside node from selection
March 19, 2013 at 3:48 amThere would be quite a few ways to do this. Here are a couple of the simplest. You might need additional code if your selection is not always guaranteed to be as you have described it.
Assuming you meant “directly after the
Selection.Collapse(sqCollapseStart);
Selection.MoveRight();
This would result in the same selection:
Selection.Collapse(sqCollapseStart);
Selection.MoveToElement("car");
As would this:
Selection.Collapse(sqCollapseStart);
Selection.MoveToElement("");
And so would this:
Selection.MoveToDocumentStart();
Selection.MoveToElement("car");