How to: Insert Text at the Cursor Position
The following code snippet demonstrates how you can insert text at the cursor position in the RichEditControl document:
Note
A complete sample project is available at https://github.
Document document = server.Document;
DocumentPosition pos = document.CaretPosition;
SubDocument doc = pos.BeginUpdateDocument();
doc.InsertText(pos, " INSERTED TEXT ");
pos.EndUpdateDocument(doc);