Format painter extension for tiptap, not support for table and bullet yet
npm i tiptap-extension-format-painter -S
Add it as any extension in useEditor()
import FormatPainter from 'tiptap-extension-format-painter'
extensions: {
FormatPainter,
/** Enable format painter */
editor.commands.enableFormatPainter({
once: false, // 是否单次效果
getChain: () => props.editor.chain(),
})
/** Format painter state notify */
editor.commands.watchFormatPainterState((isEnable: boolean) => {
console.log('FormatPainter state change:', isEnable)
})