tiptap-extension-format-painter

0.1.0 • Public • Published

tiptap-extension-format-painter

Format painter extension for tiptap, not support for table and bullet yet

Instalation

npm i tiptap-extension-format-painter -S

Usage

Add it as any extension in useEditor()

import FormatPainter from 'tiptap-extension-format-painter'

  extensions: {
    FormatPainter,

Commands

/** 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)
}) 

Package Sidebar

Install

npm i tiptap-extension-format-painter

Weekly Downloads

126

Version

0.1.0

License

MIT

Unpacked Size

11.2 kB

Total Files

7

Last publish

Collaborators

  • aliya95