Optional
logger: ILoggerOptional
editorPreferences: EditorPreferencesProtected
_Protected
_Protected
_Protected
bufferProtected
Readonly
contentProtected
Optional
Readonly
editorProtected
ignoreProtected
ignoreProtected
Optional
Readonly
loggerProtected
Readonly
m2pProtected
modelReadonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onReadonly
onReadonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onProtected
Readonly
onReadonly
onReadonly
onProtected
Readonly
onProtected
Readonly
p2mProtected
pendingProtected
Readonly
resolveProtected
Readonly
resourceProtected
resourceProtected
saveProtected
syncProtected
Readonly
toProtected
Readonly
toIf 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.
We have a TypeScript problem here. There is a const enum DefaultEndOfLine
used for ITextModel and a non-const redeclaration of that enum in the public API in
Monaco.editor. The values will be the same, but TS won't accept that the two enums are equivalent, so it says these types are irreconcilable.
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).
Protected
applyOptional
options: Partial<MonacoEditorModel.ApplyEditsOptions>Protected
asProtected
asProtected
cancelProtected
cancelCreates a snapshot of the model's contents.
Optional
preserveBOM: booleanDispose this object.
Protected
doOptional
overwriteEncoding: booleanOptional
options: SaveOptionsProtected
doOptionally 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.
Protected
fireProtected
fireProtected
fireOptional
options: SaveOptionsThe language id of the text model if known.
Retrieves a line in a text document expressed as a one-based position.
1-based
Protected
initializeFind 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.
Protected
markConverts 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.
Protected
pushProtected
readResolves the model.
Protected
runProtected
scheduleOptional
overwriteEncoding: booleanOptional
options: SaveOptionsSerializes the full state of the saveable item to a binary buffer.
Protected
setIt's a hack to dispatch close notification with an old language id; don't use it.
Protected
setProtected
setCreates 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 } }
.
Protected
traceProtected
updateProtected
updateOptional
options: Partial<MonacoEditorModel.ApplyEditsOptions>
Use
valid
to access it. UsesetValid
to mutate it.