Magnolia 6.0 reached end of life on June 26, 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

fieldType: code


Code field properties

Simple code field definition. 

form:
  tabs:
    - name: tabCode
      label: Code
      fields:
        - name: code
          fieldType: code
          language: freemarker
          label: Enter code

Node name

Value

 form


 tabs


 tabCode


 fields


 code


 fieldType

code

 label

Code

 language

freemarker

See Referencing fields for further information.

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.