From ec838a11f25d912eac9ada96cfa2c8c1b1b2f499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 5 May 2021 13:08:19 +0200 Subject: [PATCH] improve Content type --- packages/core/src/types.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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,