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"}, });