Skip to main content

HTML Editor API

Properties
NameTypeDefaultDescription
htmlrequiredstring''Sets the editor content.
moderequiredstringSets the CodeMirror language mode (e.g. 'htmlmixed', 'text/css', 'null').
disabledbooleanfalsePrevents the editor from accepting input.
auto-refreshbooleanfalseEnables the CodeMirror auto-refresh plugin.
lintbooleanfalseEnables the CodeMirror lint plugin. Requires a lint callback set via setLintCallback().
placeholderstring''Placeholder text shown when the editor is empty.
line-wrappingbooleanfalseEnables line wrapping in the editor.
line-numbersbooleanfalseShows line numbers in the gutter.
single-linebooleanfalseConstrains the editor to a single line. Combine with line-wrapping for a textarea-like appearance.
translationsobject{}Translation strings for editor UI labels.
editorbooleanRequired when vce-html-editor is a child of vce-code-editor.