Utilities & types
Helper functions, components and TypeScript types exported by the package.
Functions
| Export | Description |
|---|---|
hasExtension(editor, name) | Whether an extension (including nested ones) is registered. |
announce(message, politeness?) | Announce a message to screen readers through a shared live region. |
printHTML(html, { title }) | Print HTML through a hidden iframe (used by PDF export). |
createStandaloneHTML(html, { title, lang }) | Wrap editor HTML into a styled standalone document. |
serialize(editor, format, title?) | Get { content, mimeType, extension } for html, json, markdown, text or rtf. |
exportDocument(editor, format, filename?) | Serialize and download (or print for pdf). |
jsonToRTF(json) | Convert a Tiptap JSON document to RTF. |
toPlainText(editor) | Plain text with blank lines between blocks. |
downloadFile(content, filename, mimeType?) | Trigger a browser download. |
getUserColor(name) | Stable caret colour for a user name (collaboration entry). |
Components
| Export | Description |
|---|---|
EchoEditor | The editor component. |
EchoEditorPlugin | Vue plugin that registers EchoEditor globally. |
ActionButton | The toolbar button used by built-in extensions — reuse it for consistent custom buttons. |
ThemeToggle, ThemePicker | Dark mode toggle and colour / radius picker. |
CollaborationUsers | Presence avatars (collaboration entry). |
Types
Extension option types are exported next to each extension (HeadingOptions, TableOptions, ExportOptions, …).