Text Editor - API
Generated reference for Text Editor props, methods, parts, context accessors, and types.
#Import
import { TextEditor } from '@primeui/vue-texteditor';#API
The generated section below comes from the public TextEditor metadata. Use it for TextEditor.Root props, the value formats exposed on the default slot (getHTML, getJSON, getBlocks, getText, getMarkdown, setValue), instance methods, public interfaces, and generated style classes.
| Need | Start here |
|---|---|
| Root props and defaults | Props table in this page |
| Parts | Architecture |
| Context accessors | Context table below, then the matching feature page |
| Styling hooks | Theming |
| Accessibility expectations | Accessibility |
The API table is the contract. Feature pages add usage context, command examples, and complete demos for the same props and commands.
#Context Accessors
Each part exposes its commands, state, and request data through a matching context accessor. Descendant widgets call the accessor instead of receiving slot props, which keeps custom UI free of prop drilling.
| Accessor | Part | Exposes |
|---|---|---|
useTextEditorContext() | TextEditor.Root | commands, state, pluginCommands, the value formats (getHTML, getJSON, getBlocks, getText, getMarkdown, setValue), and disabled / readonly |
useContextToolbarContext() | TextEditor.ContextToolbar | Selection-anchored commands and state for the floating bar |
useBlockControlsContext() | TextEditor.BlockControls | The hovered block's index, blockType, and block commands |
useBlockMenuContext() | TextEditor.BlockMenu | Block options commands and the active block descriptor |
useSlashMenuContext() | TextEditor.SlashMenu | Insertion commands, state, filterText, position, and dismiss |
useMentionMenuContext<T>() | TextEditor.MentionMenu | Typed items, filterText, position, and commands.select |
useUploadContext() | TextEditor.ImageUpload / TextEditor.DocumentUpload | Upload progress, accepted files, and upload commands |
useTableControlsContext() | TextEditor.TableControls | Table commands and the current cell/selection state |
useNavigatorContext() | TextEditor.Navigator | The document heading outline and scroll commands |
The same data is also surfaced as slot props on each part for one-off prototyping. See the feature pages for per-part examples.