Document document = new Document(); document.Text = "Hello, world!";
Document document = new Document(); document.Text = "Hello, world!"; document.InsertAtCaret("Goodbye, "); document.CaretOffset = 0; document.DeleteAtCaret(6);In this example, we create a new document with the text "Hello, world!". We then insert the string "Goodbye, " at the current caret position (the end of the document) using the InsertAtCaret() method. We then move the caret to the beginning of the document and delete the first 6 characters using the DeleteAtCaret() method. The resulting text in the document is "world!". Package library: Mono.TextEditor.dll