Composables
useEditorState, useTheme, useLocale, useTiptapStore and useCollaborationUsers.
useEditorState
Derive UI state from an editor, re-evaluated at most once per animation frame and only for transactions that change the document, selection or stored marks. The selector runs outside Vue's dependency tracking, so it is safe to call editor.can() and editor.isActive() many times.
| Option | Type | Description |
|---|---|---|
sources | WatchSource[] | Extra reactive sources that trigger a re-evaluation. |
equalityFn | (a, b) => boolean | Keep the previous value when it returns true. Defaults to Object.is. |
Listeners are removed automatically when the calling component (or effect scope) is disposed.
useTheme
Shared across all editors, persisted to localStorage, SSR-safe. See Theming.
useLocale
lang is read-only — change it with await locale.setLang(code). See Internationalization.
useTiptapStore
UI state of one editor (fullscreen, preview, source code, find & replace, AI menu, spell check, printer, disabled):
Inside components rendered by <EchoEditor> (custom buttons, node views) the editor argument can be omitted — the store is injected.
useRovingToolbar
Arrow-key navigation for your own toolbars:
useCollaborationUsers
From vue-echo-editor/collaboration:
useEditor
Tiptap's own useEditor is re-exported for building a completely custom editor UI with Echo Editor extensions.