Code Editor Field

Code Editor Field

Form Widget

codeeditor - renders a plaintext editor for formatted code or markup. Note the options may be inherited by the code editor preferences defined for the Administrator in the back-end.

css_content:
    type: codeeditor
    size: huge
    language: html

The following field properties are supported and commonly used.

PropertyDescription
labela name when displaying the form field to the user.
defaultspecifies a default string value, optional.
commentplaces a descriptive comment below the field.
languagecode language, for example, php, css, javascript, html. Default: php.
showGuttershows a gutter with line numbers. Default: true.
wrapWordsbreaks long lines on to a new line. Default true.
fontSizethe text font size. Default: 12.
On This Page