codeEditor
codeEditor
is a component to display and enter source code.
codeEditor
is a multi-line text area featured with code highlighting and optional print margin and gutter with line numbers.
-
XML element:
codeEditor
-
Java class:
CodeEditor
Attributes
id - classNames - colspan - css - dataContainer - enabled - errorMessage - fontSize - height - helperText - highlightActiveLine - invalid - label - maxHeight - maxWidth - minHeight - minWidth - mode - printMarginColumn - property - readOnly - required - requiredIndicatorVisible - requiredMessage - showGutter - showLineNumbers - showPrintMargin - tabIndex - theme - title - visible - width
highlightActiveLine
Sets the highlight of the active line. If the highlighting is enabled, the line the cursor is on will be highlighted. The highlight is enabled by default.
mode
Sets syntax highlighting for a specific mode. The list of supported modes is defined in the CodeEditorMode
enumeration.
The default syntax highlighting mode is CodeEditorMode.PLAIN_TEXT
.
printMarginColumn
Sets the column for the vertical line, which shows the limit on the length of a line of code. The print margin column is 80 by default.
Handlers
AttachEvent - BlurEvent - ClientValidatedEvent - ComponentValueChangeEvent - CompositionEndEvent - CompositionStartEvent - CompositionUpdateEvent - DetachEvent - FocusEvent - InputEvent - KeyDownEvent - KeyPressEvent - KeyUpEvent - statusChangeHandler - validator
Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню Code → Generate (Alt+Insert / Cmd+N). |