mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-08-06 13:38:49 +08:00
improve Content type
This commit is contained in:
parent
9ff7e2400e
commit
ec838a11f2
@ -60,7 +60,16 @@ export interface EditorOptions {
|
||||
onDestroy: () => void,
|
||||
}
|
||||
|
||||
export type Content = string | Record<string, any> | null
|
||||
export type HTMLContent = string
|
||||
|
||||
export type JSONContent = {
|
||||
type: string,
|
||||
attrs?: Record<string, any>,
|
||||
content?: JSONContent[],
|
||||
[key: string]: any,
|
||||
}
|
||||
|
||||
export type Content = HTMLContent | JSONContent | JSONContent[] | null
|
||||
|
||||
export type CommandProps = {
|
||||
editor: Editor,
|
||||
|
Loading…
Reference in New Issue
Block a user