fix: Switch from hostic dom to zeed dom (#2151)
* add zeed-dom * update zeed-dom for performance improvements
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user