Posted 18 years ago
by Richard Beyer
-
KBS Leipzig
![Avatar](https://secure.gravatar.com/avatar/84c372277cff2e604b0d596acd3b5a97.jpg?s=64&d=identicon&r=g)
After _editor.SelectedView.InsertSurroundingText(openingTag, closingTag);
the selection gets lost. How do I select the original text again to do another .InsertSurroundingText?
greetings
Richard
EDIT: found it after starting this thread ^^[Modified at 08/24/2006 07:59 AM]
the selection gets lost. How do I select the original text again to do another .InsertSurroundingText?
greetings
Richard
EDIT: found it after starting this thread ^^
int selectionstartingposition = _editor.SelectedView.Selection.FirstOffset;
int selectionlength = _editor.SelectedView.Selection.Length;
_editor.SelectedView.InsertSurroundingText(openingTag, closingTag);
_editor.SelectedView.Selection.SelectRange(selectionstartingposition+openingTag.Length,selectionlength);