| CARVIEW |
Select Language
HTTP/2 301
server: nginx
date: Sun, 28 Dec 2025 15:43:11 GMT
content-type: text/html
content-length: 162
location: /api-reference/text-edit/
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000;
HTTP/2 200
server: nginx
date: Sun, 28 Dec 2025 15:43:11 GMT
content-type: text/html
last-modified: Tue, 26 Aug 2025 18:14:18 GMT
vary: Accept-Encoding
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
content-encoding: gzip
strict-transport-security: max-age=31536000;
TextEdit - Nova
RESULTS:
No Results
Building Extensions
Contributing Languages
JavaScript API Reference
TextEdit
A single edit that may be applied to an editor
A TextEdit describes a single change that may be applied to a TextEditor. An array of TextEdit objects represent a set of changes that may be applied together atomically. TextEdit objects are most often used with APIs such as CompletionItem to describe set of edits to apply.
Added in Nova 2
Static Methods
delete(range)
Returns a new text edit that deletes text in the Range range.
insert(position, newText)
Returns a new text edit that inserts text at position.
replace(range, newText)
Returns a new text edit that replaces the Range range with newText.
Class Methods
constructor(range, newText)
Creates a new text edit that replaces the Range range with newText.
Properties
newText
A String that will be inserted when the text edit is applied.
range
The Range that will be replaced when the edit is applied.