From b3d0549f7f9b9a88232cb7c5a630cc275030a722 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Wed, 22 Jul 2026 16:47:07 +0900 Subject: [PATCH] =?UTF-8?q?260722=5F01=5FENH:=20KriEditorWysiwyg=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- registry/components/kri-editor/KriEditorWysiwyg.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 16b718d..294cf85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kri-ui-registry", - "version": "0.9.0", + "version": "0.9.1", "private": true, "description": "KRI internal shadcn UI registry", "scripts": { diff --git a/registry/components/kri-editor/KriEditorWysiwyg.tsx b/registry/components/kri-editor/KriEditorWysiwyg.tsx index 0847e29..6168957 100644 --- a/registry/components/kri-editor/KriEditorWysiwyg.tsx +++ b/registry/components/kri-editor/KriEditorWysiwyg.tsx @@ -483,10 +483,11 @@ export function KriEditorWysiwyg(props: KriEditorProps) { if (value == null) return; const current = editor.getHTML(); + const normalizedValue = value || "

"; - if (value !== current && value !== optimisticHtmlRef.current) { + if (normalizedValue !== current && normalizedValue !== optimisticHtmlRef.current) { // 이미지가 포함된 HTML 업데이트면, 아예 editor를 새로 생성 - editor.commands.setContent(value, { + editor.commands.setContent(normalizedValue, { emitUpdate: false, parseOptions: {preserveWhitespace: "full"}, });