vce-code-editor must have the following child component:
vce-html-editor This child component must have an `editor` attribute
Optional Child Components
vce-code-editor may have the following child components:
vce-code-editor-validation-status-display This child component must have a `validation-status-display` attribute
vce-code-editor-twig-validator This child component must have a `twig-validator` attribute
API Reference vce-code-editor
HTML Attributes API
Name
Description
Type
Required
Default value
single-line
Display the editor as a single line of text similar to an input box. When combined with the line-wrapping attribute the editor looks similar to a text area element.
boolean
false
disabled
Specifies that CodeMirror will not accept input.
boolean
false
Events
Event
Description
Returns
update
Fires when any of the configurations changed.
{
detail: []
}
API Reference vce-code-editor-twig-validator
HTML Tag Attributes
Name
Description
Type
Required
Default value
debounce-time
The debounce on the personalization call
string
true
validation-url
Sets the validator URL
string
true
code
Code to be validated
string
true
twig-validator
This attribute is required when using vce-code-editor
boolean
*
true
* The twig-validator attribute must exist when <vce-code-editor-twig-validator> is a child of <vce-code-editor>.