fix: Switch from hostic dom to zeed dom (#2151)

* add zeed-dom

* update zeed-dom for performance improvements
This commit is contained in:
Philipp Kühn
2021-11-09 16:09:39 +01:00
committed by GitHub
parent 696cfcbd8b
commit 56a75db024
4 changed files with 19 additions and 20 deletions

View File

@@ -1,11 +1,10 @@
import { DOMParser } from 'prosemirror-model'
import { getSchema, Extensions } from '@tiptap/core'
// @ts-ignore
import { parseHTML } from 'hostic-dom'
import { parseHTML } from 'zeed-dom'
export default function generateJSON(html: string, extensions: Extensions): Record<string, any> {
const schema = getSchema(extensions)
const dom = parseHTML(html)
const dom = parseHTML(html) as unknown as Node
return DOMParser.fromSchema(schema)
.parse(dom)