rename HTML function names
This commit is contained in:
13
packages/html/getHTMLFromFragment.ts
Normal file
13
packages/html/getHTMLFromFragment.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Node, DOMSerializer, Schema } from 'prosemirror-model'
|
||||
// @ts-ignore
|
||||
import { createHTMLDocument } from 'hostic-dom'
|
||||
|
||||
export default function getHTMLFromFragment(doc: Node, schema: Schema): string {
|
||||
return DOMSerializer
|
||||
.fromSchema(schema)
|
||||
.serializeFragment(doc.content, {
|
||||
document: createHTMLDocument(),
|
||||
})
|
||||
// @ts-ignore
|
||||
.render()
|
||||
}
|
||||
Reference in New Issue
Block a user