You can also define a custom style and color theme for the editor. This component provides a convenient
Java API that is a light wrapper around the underlying JavaScript API. Specify the available themes
via the customThemes
option on the editor. Then you can enable that theme by setting
the theme
option on the editorOptions
. See also the
example on the Monaco editor homepage.
When you need even more fine-grained control, consider using the
client-side API
directly via the extender
option.
${showcase:getFileContent('/sections/monacoEditor/example-customTheme.xhtml')}
${showcase:getFileContent('/org/primefaces/extensions/showcase/controller/MonacoEditorController.java')}
${showcase:getFileContent('/org/primefaces/extensions/showcase/util/MonacoEditorSettings.java')}