mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
fix: improve types for generateHTML
This commit is contained in:
parent
c8375aa294
commit
502b5b1cc9
@ -1,9 +1,9 @@
|
||||
import { Node } from 'prosemirror-model'
|
||||
import getSchema from './getSchema'
|
||||
import getHTMLFromFragment from './getHTMLFromFragment'
|
||||
import { Extensions } from '../types'
|
||||
import { Extensions, JSONContent } from '../types'
|
||||
|
||||
export default function generateHTML(doc: object, extensions: Extensions): string {
|
||||
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
|
||||
const schema = getSchema(extensions)
|
||||
const contentNode = Node.fromJSON(schema, doc)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Extensions, getSchema } from '@tiptap/core'
|
||||
import { Extensions, getSchema, JSONContent } from '@tiptap/core'
|
||||
import { Node } from 'prosemirror-model'
|
||||
import getHTMLFromFragment from './getHTMLFromFragment'
|
||||
|
||||
export default function generateHTML(doc: object, extensions: Extensions): string {
|
||||
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
|
||||
const schema = getSchema(extensions)
|
||||
const contentNode = Node.fromJSON(schema, doc)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user