pe

Tag monacoEditorFramed

Component Information 
InfoValue
Component Typeorg.primefaces.extensions.component.MonacoEditorFramed
Handler ClassNone
Renderer Typeorg.primefaces.extensions.component.MonacoEditorFramedRenderer
DescriptionNone
Attributes 
NameRequiredTypeDescription
autoResizefalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
If true, resizes the editor automatically when the iframe element changes its size. Please note that this makes uses of the new ResizeObserver API and works only in newer browers. This widget checks whether ResizeObserver API is available, and when it is not, no resizing is performed. To support resizing for older browsers, search for a ResizeObserver polyfill. If you know when the size of the editor conainer could have changed, you can resize the editor manually via PF("editorWidgetVar").layout()
basenamefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The monaco editor requires a unique URI for an opened model (i.e. the code currently being edited). This is the basename for that URI, without the extension. If not given, default to 'file'.
bindingfalsejakarta.el.ValueExpression
(must evaluate to javax.faces.component.UIComponent)
An EL expression referring to a server side UIComponent instance in a backing bean.
converterfalsejakarta.el.ValueExpression
(must evaluate to javax.faces.convert.Converter)
An EL expression or a literal text that defines a converter for the component. When it's an EL expression, it's resolved to a converter instance. In case it's a static text, it must refer to a converter id.
converterMessagefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Message to display when conversion fails.
customThemesfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Map)
Allows you to register custom themes with the editor via Java. This must be a Map<String, org.primefaces.extensions.model.monacoeditor.EditorStandaloneTheme>. It maps between the name of the theme and the styling data for that theme. You can then specify the theme name for the theme option in the editorOptions.
directoryfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The monaco editor requires a unique URI for an opened model (i.e. the code currently being edited). This is the directory (path) for that URI, with parts separated by slashes. If not given, it is taken from the client ID of this component.
disabledfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
Defines if the editor is disabled. This option does not accept a value to be submitted and ensures the model values stays the same (server validation).
editorOptionsfalsejakarta.el.ValueExpression
(must evaluate to org.primefaces.extensions.model.monacoeditor.EditorOptions)
Options for the monaco code editor. This is a simple wrapper around the JavaScript API, see IEditorConstructionOptions The code language can be set via the EditorOptions#setLanguage option.
extenderfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

An extender object to further customize the monaco editor via JavaScript. This must be a URL to a JavaScript file with the extender. The JavaScript file is loaded inside the iframe context and must (synchronously, i.e. upon its execution) set window.MonacoEnvironment.Extender to the extender object that is to be used.

The extender object may have one or more of the following optional properties:
  • beforeCreate(monacoContext, options). Called before the monaco editor is created. It 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 are used as they were passed to the callback. The callback is allowed to modify the passed options object. If the callback returns an options object, that options object is used instead. If it returns a thenable/Promise, the monaco editor is created only once the Promise resolves (successfully). If the Promise resolves with an options object, that options object is used to create the editor. See IStandaloneEditorConstructionOptions for all editor options.
  • afterCreate(monacoContext). Called after the editor was created.
  • beforeDestroy(monacoContext). Called before the editor is destroyed, e.g. when updating a component via AJAX.
  • afterDestroy(monacoContext). Called after the editor is destroyed, e.g. when updating a component via AJAX. Note that monacoContext.getMonaco() now returns undefined.
  • createEditorOverrideServices(monacoContext, options). Called when the 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 options are the editor constructor options that will be used to create the editor, they are readonly and must not be changed.
  • createModel(monacoContext, options). Called when a model needs to retrieved or created. The options contain value (current value that should be set on the model by the extender), url (default URL that was determined for the model), language (requested code language), and editorOptions (monaco editor constructor options). Should return the model. When it returns nothing, the default mechanism for creating a model is used. Note that monacoContext.getMonaco() returns undefined as the Monaco editor was not created yet.
  • createWorker(monacoContext, moduleId, label). 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, e.g. css or javascript. Must return the worker to be used for the given language. Note that monacoContext.getMonaco() returns undefined as the Monaco editor was not created yet.
All methods of the extender are evaluated within the iframe page, so the editor widget instance is not available. The monacoContext passed as the first argument to the extender methods is an object with one essential method: getMonaco(). Use this method to get the current monaco editor instance and interact with the editor.
extensionfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The monaco editor requires a unique URI for an opened model (i.e. the code currently being edited). This is the extension for that URI, with or without the period. If not given, it is inferred from the (code) language.
heightfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Height of the editor with CSS units, set as an inline style. For example 500px or 100%/code>. Set this to the empty string in case you want to size the editor via CSS.
idfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Unique identifier of the component in a naming container.
iframeUrlParamsfalsejakarta.el.ValueExpression
(must evaluate to java.util.Map)
Additional URL parameters that are added to the iframe URL where the framed Monaco editor is loaded. This may be useful, for example, when you wish to pass additional arguments to the extender script. Must be either a java.lang.Map<String, String | List<String>> (i.e. a map where keys are strings and values are strings or lists of strings); or a java.lang.String with a JavaScript expression that evaluates to an object representing such a map.
localefalsejakarta.el.ValueExpression
(must evaluate to java.lang.Object)
Locale for the user interface. Can be either a java.util.Locale object or a string with the locale code. Built-in languages are "cs", "de", "en", "es", "fr", "it", "ja", "ko", "pl", "pt_BR", "ru", "tr", "zh_CN", and "zh_TW". To use a custom language or translation, you can specify a language file with custom translations via the option localeUrl.
localeUrlfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
For custom language files. If given, this is used instead of the built-in language files. This URL must point to a JavaScript file that, when executed, adds the localization to window.MonacoEnvironment.Locale["LOCALE_CODE"], where LOCALE_CODE is the value you set for locale. See the language file the widget downloads (when language is not set to English) for an example and all available messages that need to be translated.
onblurfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when the editor area loses focus. Please note that the callback is run in the context of the main window, not in the iframe context.
onchangefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when the editor content changes. Please note that the callback is run in the context of the main window, not in the iframe context.
onfocusfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when the editor area receives focus. Please note that the callback is run in the context of the main window, not in the iframe context.
oninitializedfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when the editor was rendered. Please note that the callback is run in the context of the main window, not in the iframe context.
onkeydownfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when a keydown event was triggered on the editor area. Please note that the callback is run in the context of the main window, not in the iframe context.
onkeyupfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when a keyup event was triggered on the editor area. Please note that the callback is run in the context of the main window, not in the iframe context.
onmousedownfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when a mousedown event was triggered on the editor area. Please note that the callback is run in the context of the main window, not in the iframe context.
onmousemovefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when a mousemove event was triggered on the editor area. Please note that the callback is run in the context of the main window, not in the iframe context.
onmouseupfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when a mouseup event was triggered on the editor area. Please note that the callback is run in the context of the main window, not in the iframe context.
onpastefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Client side callback when text was pasted into the editor. Please note that the callback is run in the context of the main window, not in the iframe context.
readonlyfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
Defines if the editor is readonly. This option makes the UI not editable, but still accepts values that are submitted (e.g. when the editor value was changed via JavaScript). Use disabled if submitted values should not be accepted.
renderedfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
Boolean value to specify the rendering of the component, when set to false component will not be rendered.
requiredfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
Marks component as required.
requiredMessagefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Message to display when required field validation fails.
schemefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The monaco editor requires a unique URI for an opened model (i.e. the code currently being edited). This is the scheme (protocol) for that URI. Defaults to inmemory.
stylefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
CSS style(s) to be applied when this component is rendered.
styleClassfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Space-separated list of CSS style class(es) to be applied when this element is rendered. This value is passed through as the "class" attribute to the generated markup.
tabindexfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The tab index to assign to the editor. If not given, no tab index will be assigned.
validatorfalsejakarta.el.ValueExpression
(must evaluate to javax.faces.validator.Validator)
A method expression referring to a method validating the input.
validatorMessagefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Message to display when validation fails.
valuefalsejakarta.el.ValueExpression
(must evaluate to java.lang.Object)
Value of the component.
widgetVarfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Name of the client side widget.
widthfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Width of the editor with CSS units, set as an inline style. For example 500px or 100%/code>. Set this to the empty string in case you want to size the editor via CSS.

Output generated by Vdldoc View Declaration Language Documentation Generator.