1.0.2 • Published 2 years ago
@sudowrite/tiptap-html-with-options v1.0.2
@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})