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
Name | Type | Default | Description |
---|---|---|---|
addBottomSpace | boolean | false | Adds spacing under the field that is consistent whether hint/error text is displayed. |
controls | TextEditorControls | () => [] | A set of custom toolbar controls to pass to the Quill editor. |
errorText | string | undefined | Error text to display. Replaces `hintText` (if provided) & adds error styling. |
handlers | TextEditorControlHandlerMap | () => ({}) | An object map of custom handlers to pass to the Quill editor. |
hintText | string | undefined | Displays text below the input; hidden when the isReadOnly prop is truthy. |
id | string | undefined | ID for the Label and Input; must be unique |
isDisabled | boolean | - | Whether the field is disabled. |
isReadOnly | boolean | false | Whether it's a readonly field. |
isRequired | boolean | false | Whether the field is required. |
label | string | undefined | Label to render above the input. |
modelValue | string | '' | The model value. |
placeholder | string | '' | Placeholder text to display when the editor is empty. |
showOptionalInLabel | boolean | false | Show "(optional)" to the right of the label text |
Slots
None
Events
Name | Description |
---|---|
update:model-value | Emitted when the model value changes. |
focus | Emitted when an editor text is in focus (including an empty space). |
blur | Emitted when an editor text loses focus (including an empty space). |