The widget-specific configuration of this widget instance.
The extender that was set for this monaco editor widget. It can be used to customize the editor via JavaScript.
A reference to the base (container) element of this widget.
A reference to the base (container) element of this widget.
The widget variable of this widget instance.
If it exists, calls the behavior with the given name.
Name of the behavior.
Additional arguments for the behavior.
Destroys this widget. Called by the PrimeFaces framework.
The HTML container element holding the editor. It exists even if the editor was not created yet.
The hidden textarea holding the value of the editor (eg. the code being edited, this is also the value that is sent when the form is submitted).
A reference to the base (container) element of this widget.
Finds the current instance of the monaco editor, if it was created already. Use this to interact with the editor via JavaScript. See also the monaco editor API docs.
The current monaco editor instance. undefined
in case the editor was not created yet.
Gets the value of this editor. May be called as soon as this widget is accessible, even when the monaco editor was not loaded or initialized yet.
The current value of this editor.
Name of the behavior to check.
Whether any handlers are registered for the given behavior.
Initializes this widget. Called by the PrimeFaces framework.
Configuration as set on the server-side.
Whether this widget is attached to the DOM currently.
true
when the editor was already loaded and initialized and can be interacted with via
getMonaco()
, false
otherwise.
Refreshes this widget with the given configuration.
New configuration for this widget.
Client ID of the script element to remove.
Sets the value of this editor. May be called as soon as this widget is accessible, even when monaco editor was not loaded or initialized yet. The value will be set on the editor once it becomes ready.
The new value to set.
Calls the given handler with the current monaco editor instance if it exists.
Type of the return value.
Handler that is invoked with the current monaco editor instance.
Default value that is returned when no editor exists currently, or when the handler throws.
The return value of the handler, or the default return value if either no editor exists or the handler throws an error.
Calls the given handler with the current monaco editor instance if it exists.
Type of the return value.
Handler that is invoked with the current monaco editor instance.
The return value of the handler, or undefined
if either no editor exists or the handler throws
an error.
A promise that is resolved once the editor has finished loading and was created successfully.
Calls the given handler with the current monaco editor instance if it exists.
Type of the return value.
Handler that is invoked with the current monaco editor instance.
Default value that is returned when no editor exists currently.
The return value of the handler, or the default return value if no editor exists.
Calls the given handler with the current monaco editor instance if it exists.
Type of the return value.
Handler that is invoked with the current monaco editor instance.
The return value of the handler, or undefined
if no editor exists.
Generated using TypeDoc
The monaco editor widget. This is a thin wrapper around the actual monaco editor and mainly takes care of initializing the editor, ie. it serves as a bridge between JSF/PrimeFaces and monaco editor.
Please note that monaco editor is initialized asynchronously -
getMonaco()
may returnundefined
until monaco editor was created successfully. You can usewhenReady
to be notified once the editor was created.