This method is called after the editor was created.
The current context object.
true
if the monaco editor library was reloaded, false
otherwise. In case it was reloaded,
you may want to setup some language defaults again.
Called after the editor was destroyed; and also when updating a component via AJAX.
The current context object. Note that you should not use it to retrieve the monaco editor instance, as the editor has already been destroyed.
Called before monaco editor is created. This method is passed the current options object that would be used to initialize the monaco editor.
If this callback does not return a value, the options that were passed are used. You may modify the options in-place.
If it returns a new options object, that options object is used.
If it returns a Thenable or Promise, the monaco editor is created only once the Promise resolves (successfully). If the Promise returns a new options object, these options are used to create the editor.
See IStandaloneEditorConstructionOptions for all editor options.
The current context object. Note that you should not use it to retrieve the monaco editor instance, as the editor was not created yet.
The current options that would be used to create the editor.
true
if the monaco editor library was reloaded, false
otherwise. In case it was reloaded, you
may want to setup some language defaults again.
Either undefined
to use the options as passed; a new options object to be used for creating the editor;
or a Promise that may return the new options.
Called before the editor is destroyed, eg. when updating a component via AJAX.
The current context object.
Called when monaco editor is created. May return an object with services that should be overriden. See here on github for details on the available services.
The current context object. Note that you should not use it to retrieve the monaco editor instance, as the editor was not created yet.
The options that will be used to create the editor. Readonly and must not be changed.
The override options to be used. If undefined
is returned, no editor override services are used.
Called when the model needs to be fetched. The default implementation attempts to find an existing model for the
given URI in the monaco store (monaco.editor.getModel
). If it cannot be found, it creates a new model
(monaco.editor.createModel
). Finally it sets the default value on the model. This method can be used to create a
custom when neccessary, with possibly a different URI.
If you implement this callback, you SHOULD set the initial value (data.value
) on the model, it will NOT be set
automatically.
The current context object. Note that you should not use it to retrieve the monaco editor instance, as the editor was not created yet.
Options with the default URI, the current value, and the editor configuration.
The retrieved or created model. When undefined
, the default mechanism to create the model ist used.
Called when a worker for additional language support needs to be created. By default, monaco editor ships with
the workers for JSON, CSS, HTML, and TYPESCRIPT. The label is the name of the language, eg. css
or
javascript
. This method must return the worker to be used for the given language.
The current context object. Note that you should not use it to retrieve the monaco editor instance, as the editor was not created yet.
Module ID for the worker. Useful only with the AMD version, can be ignored.
Label of the language for which to create the worker.
The worker to be used for the given code language.
Generated using TypeDoc
Extender for the framed editor that must communicate via postMessage with the editor.