From c1d0bb3c936eb659e25fd21b17860ccaffb99dc5 Mon Sep 17 00:00:00 2001 From: LovelessCodes Date: Tue, 10 Jun 2025 20:26:38 +0200 Subject: [PATCH] fix: make onChange prop optional in Editor and rename markdown prop to content (#72) --- apps/web/src/components/Editor.tsx | 4 ++-- apps/web/src/views/public/board/CardModal.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/Editor.tsx b/apps/web/src/components/Editor.tsx index 41135ed4..9a07a55d 100644 --- a/apps/web/src/components/Editor.tsx +++ b/apps/web/src/components/Editor.tsx @@ -284,7 +284,7 @@ export default function Editor({ readOnly = false, }: { content: string | null; - onChange: (value: string) => void; + onChange?: (value: string) => void; onBlur?: () => void; readOnly?: boolean; }) { @@ -310,7 +310,7 @@ export default function Editor({ }), ], content, - onUpdate: ({ editor }) => onChange(editor.getHTML()), + onUpdate: ({ editor }) => onChange?.(editor.getHTML()), onBlur: ({ event }) => { if ( document diff --git a/apps/web/src/views/public/board/CardModal.tsx b/apps/web/src/views/public/board/CardModal.tsx index ed641459..cf268afe 100644 --- a/apps/web/src/views/public/board/CardModal.tsx +++ b/apps/web/src/views/public/board/CardModal.tsx @@ -93,7 +93,7 @@ export function CardModal({ {data?.description && (
- +
)}