Posted 18 years ago by Richard Beyer - KBS Leipzig
After _editor.SelectedView.InsertSurroundingText(openingTag, closingTag);

the selection gets lost. How do I select the original text again to do another .InsertSurroundingText?


EDIT: found it after starting this thread ^^

int selectionstartingposition = _editor.SelectedView.Selection.FirstOffset;
int selectionlength = _editor.SelectedView.Selection.Length;
_editor.SelectedView.InsertSurroundingText(openingTag, closingTag);
[Modified at 08/24/2006 07:59 AM]

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Richard,

We've also added a couple new overloads to InsertSurroundingText for v4.0. One of them lets you indicate that you want to reselect the inner contents.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.