JSPM

tiptap-extension-format-painter

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 137
  • Score
    100M100P100Q87536F
  • License MIT

FormatPainter extension for tiptap (tiptap 格式刷)

Package Exports

  • tiptap-extension-format-painter
  • tiptap-extension-format-painter/src/index.ts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tiptap-extension-format-painter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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