Optionallogger: ILoggerOptionaleditorPreferences: EditorPreferencesProtected_Protected_Protected_ProtectedbufferProtected ReadonlycontentProtected Optional ReadonlyeditorProtectedignoreProtectedignoreProtected Optional ReadonlyloggerProtected Readonlym2pProtectedmodelReadonlyonProtected ReadonlyonReadonlyonProtected ReadonlyonReadonlyonReadonlyonProtected ReadonlyonReadonlyonProtected ReadonlyonProtected ReadonlyonReadonlyonReadonlyonProtected ReadonlyonProtected Readonlyp2mProtectedpendingProtected ReadonlyresolveProtected ReadonlyresourceProtectedresourceProtectedsaveProtectedsyncProtected ReadonlytoProtected ReadonlytoIf false, the saveable will not participate in autosaving.
The identifier of the language associated with this document.
The number of lines in this document.
This event is fired when the content of the saveable changes.
While onDirtyChanged is fired to notify the UI that the widget is dirty,
onContentChanged is used for the auto save throttling.
This event is fired when the content of the dirty variable changes.
Emitted when the text model is about to be disposed.
Same as ITextEditorModel#textEditorModel, but never null.
The associated URI for this document. Most documents have the file-scheme, indicating that they represent files on disk. However, some documents may have other schemes indicating that they are not available on disk.
Whether it is possible to load content from the underlying resource.
The version number of this document (it will increase after each change, including undo/redo).
ProtectedapplyOptionaloptions: Partial<MonacoEditorModel.ApplyEditsOptions>ProtectedasProtectedasProtectedcancelProtectedcancelCreates a snapshot of the model's contents.
OptionalpreserveBOM: booleanDispose this object.
ProtecteddoOptionaloverwriteEncoding: booleanOptionaloptions: SaveOptionsProtecteddoOptionally return file filters for the "Save As" dialog.
The keys of the returned object are the names of the filters and the values are arrays of file extensions.
For example: { 'Text Files': ['txt', 'text'], 'All Files': ['*'] }
If no filters are provided, a default filter of All Files (*.*) will be used.
Find all matches in an editor for the given options.
the options for finding matches.
the list of matches.
ProtectedfireProtectedfireProtectedfireOptionaloptions: SaveOptionsThe language id of the text model if known.
Retrieves a line in a text document expressed as a one-based position.
1-based
ProtectedinitializeFind out if this text model has been disposed.
Signals if this model is readonly or not.
Find out if the editor model was resolved or not.
ProtectedmarkConverts the position to a zero-based offset. Invalid positions are adjusted as described in Position.line and Position.character.
A position.
A valid zero-based offset.
ProtectedpushProtectedreadResolves the model.
ProtectedrunProtectedscheduleOptionaltoken: CancellationTokenOptionaloverwriteEncoding: booleanOptionaloptions: SaveOptionsSerializes the full state of the saveable item to a binary buffer.
ProtectedsetIt's a hack to dispatch close notification with an old language id; don't use it.
ProtectedsetProtectedsetCreates a valid position. If the position is outside of the backing document, this method will return a position that is ensured to be inside the document and valid.
For example, when the position is { line: 1, character: 0 } and the document is empty, this method will return with { line: 0, character: 0 }.
Creates a valid range. If the range argument is outside of the document, this method will return with a new range that does not exceed the boundaries of the document.
For example, if the argument is { start: { line: 1, character: 0 }, end: { line: 1, character: 0 } } and the document is empty, the return value is
{ start: { line: 0, character: 0 }, end: { line: 0, character: 0 } }.
ProtectedtraceProtectedupdateProtectedupdateOptionaloptions: Partial<MonacoEditorModel.ApplyEditsOptions>
Use
validto access it. UsesetValidto mutate it.