@sudowrite/tiptap-html-with-options
v1.0.2
Published
utility package to render tiptap JSON as HTML
Readme
@sudowrite/tiptap-html-with-options
Fork of the TipTap package @tiptap/html that adds an optional options argument to generateJSON() to pass options to the Prosemirror DOMParser's parse method.
Among other things, this allows one to instruct generateJSON() to preserve \t and other whitespace characters.
Installation
npm install @sudowrite/tiptap-html-with-optionsUsage
import { generateJSON } from '@sudowrite/tiptap-html-with-options'
const json = generateJSON(html, [...your tiptap extensions...], {preserveWhitespace:1})