fix: fixed type for Content

This commit is contained in:
Philipp Kühn
2021-04-09 08:22:13 +02:00
parent 3ef0c3bf8d
commit 39147f5b02
3 changed files with 3 additions and 7 deletions

View File

@@ -1,9 +1,7 @@
import { Schema, Node as ProseMirrorNode } from 'prosemirror-model'
import { AnyObject } from '../types'
import { AnyObject, Content } from '../types'
import createNodeFromContent from './createNodeFromContent'
export type Content = string | JSON | null
export default function createDocument(
content: Content,
schema: Schema,

View File

@@ -5,9 +5,7 @@ import {
Fragment,
} from 'prosemirror-model'
import elementFromString from '../utilities/elementFromString'
import { AnyObject } from '../types'
export type Content = string | JSON | null
import { AnyObject, Content } from '../types'
export type CreateNodeFromContentOptions = {
slice?: boolean,

View File

@@ -40,7 +40,7 @@ export interface EditorOptions {
onDestroy: () => void,
}
export type Content = string | JSON | null
export type Content = string | AnyObject | null
export type CommandProps = {
editor: Editor,