TextEditorEdit

A complex edit that will be applied in one transaction on a TextEditor. This holds a description of the edits and if the edits are valid (i.e. no overlapping regions, document was not changed in the meantime, etc.) they can be applied on a document} associated with a {@link TextEditor text editor.

Online Documentation

Functions

Link copied to clipboard
abstract fun delete(location: JsAny)

Delete a certain text region.

Link copied to clipboard
abstract fun insert(location: Position, value: String)

Insert text at a location. You can use \r\n or \n in value and they will be normalized to the current document. Although the equivalent text edit can be made with replace, insert will produce a different resulting selection (it will get moved).

Link copied to clipboard
abstract fun replace(location: JsAny, value: String)

Replace a certain text region with a new value. You can use \r\n or \n in value and they will be normalized to the current document.

Link copied to clipboard
abstract fun setEndOfLine(endOfLine: EndOfLine)

Set the end of line sequence.