Code Editor

<sw-code-editor>

ready
Renders a code editor

Usage

Loading...
<sw-code-editor label="Description">
</sw-code-editor>

Component properties

Property name Type Default
value String
label String
completerFunction Function
editorConfig Object
completionMode String text
mode String twig
softWraps Boolean true
setFocus Boolean false

Methods

Method name Parameters
mountedComponent No parameters
destroyedComponent No parameters
onInput No parameters
onBlur No parameters
defineAutocompletion completerFunction

Imports

  • ace-builds/src-noconflict/ace
  • ace-builds/src-noconflict/ext-language_tools
  • ace-builds/src-noconflict/mode-twig
  • ./sw-code-editor.html.twig
  • ./sw-code-editor.scss

Watcher

  • value
  • softWraps

SASS variables

Variable name Value
$sw-text-editor-color-border $color-steam-cloud ($color-gray-300)
$sw-text-editor-color-label $color-kashmir ($color-darkgray-200)

Twig blocks

  • sw_text_editor_label
  • sw_code_editor_editor
  • sw_code_editor