Skip to content

TextEditor API

API reference docs for the Stash TextEditor component. Learn about the props, CSS, and other APIs of this exported module.

Import

ts
import TextEditor from '@leaflink/stash/TextEditor.vue';

Props

NameTypeDefaultDescription
addBottomSpacebooleanfalseAdds spacing under the field that is consistent whether hint/error text is displayed.
controlsTextEditorControls() => []A set of custom toolbar controls to pass to the Quill editor.
errorTextstringundefinedError text to display. Replaces `hintText` (if provided) & adds error styling.
handlersTextEditorControlHandlerMap() => ({})An object map of custom handlers to pass to the Quill editor.
hintTextstringundefinedDisplays text below the input; hidden when the isReadOnly prop is truthy.
idstringundefinedID for the Label and Input; must be unique
isDisabledboolean-Whether the field is disabled.
isReadOnlybooleanfalseWhether it's a readonly field.
isRequiredbooleanfalseWhether the field is required.
labelstringundefinedLabel to render above the input.
modelValuestring '' The model value.
placeholderstring '' Placeholder text to display when the editor is empty.
showOptionalInLabelbooleanfalseShow "(optional)" to the right of the label text

Slots

None

Events

NameDescription
update:model-valueEmitted when the model value changes.
focusEmitted when an editor text is in focus (including an empty space).
blurEmitted when an editor text loses focus (including an empty space).