Custom extensions
Write your own extension with a toolbar button, or extend a built-in one.
An Echo Editor extension is a Tiptap extension whose options include a button function. The toolbar calls it to render the control.
A toolbar button for a custom command
extensions/Timestamp.ts
The button contract
button({ editor, extension, t }) returns one item (or an array of items):
The function runs at most once per animation frame, so reading editor.isActive() / editor.can() inside it is cheap.
Your own component receives editor and disabled props in addition to componentProps.
Extending a built-in extension
Node views with Vue
Use Tiptap's VueNodeViewRenderer for interactive blocks. Remember that in Tiptap 3 getPos() can return undefined:
To package extensions, buttons, slash commands and translations together, use definePlugin.