diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index b0773729..5aa19959 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -60,7 +60,16 @@ export interface EditorOptions { onDestroy: () => void, } -export type Content = string | Record | null +export type HTMLContent = string + +export type JSONContent = { + type: string, + attrs?: Record, + content?: JSONContent[], + [key: string]: any, +} + +export type Content = HTMLContent | JSONContent | JSONContent[] | null export type CommandProps = { editor: Editor,