Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

CodeFieldDefinition renders a code editor field.

class: info.magnolia.ui.form.field.definition.CodeFieldDefinition


Code field properties

Simple code field definition. 

form:
  tabs:
    - name: tabCode
      label: Code
      fields:
        - name: code
          class: info.magnolia.ui.form.field.definition.CodeFieldDefinition
          language: freemarker
          label: Enter code

Node name

Value

 form


 tabs


 tabCode


 fields


 code


 class

info.magnolia.ui.form.field.definition.CodeFieldDefinition

 label

Code

 language

freemarker

You can use  common field properties  and the following properties in a code field definition:

Properties:

<field name>Name of field.

language

optional

Language used for syntax highlighting.

fileNameProperty

optional

Defines the Vaadin propertyId under which the file name is exposed by the current form Item .

height

optional, default is 300

Height in pixels of the editor.

  • No labels