improve Content type
This commit is contained in:
@@ -60,7 +60,16 @@ export interface EditorOptions {
|
|||||||
onDestroy: () => void,
|
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 = {
|
export type CommandProps = {
|
||||||
editor: Editor,
|
editor: Editor,
|
||||||
|
|||||||
Reference in New Issue
Block a user