From ac672dfc77d1dce27f224338699a96e525e5bbc0 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Tue, 28 Jul 2026 15:24:26 +0900 Subject: [PATCH] =?UTF-8?q?260728=5F03=5FENH:=20=EC=97=90=EB=94=94?= =?UTF-8?q?=ED=84=B0=20=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/KriEditor.tsx | 6 +++--- registry/components/kri-editor/KriEditorSms.tsx | 2 ++ registry/components/kri-editor/KriEditorWysiwyg.tsx | 1 + registry/components/kri-editor/types.ts | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 094e1bb..d43c1bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kri-ui-registry", - "version": "0.9.4", + "version": "0.9.5", "private": true, "description": "KRI internal shadcn UI registry", "scripts": { diff --git a/registry/components/kri-editor/KriEditor.tsx b/registry/components/kri-editor/KriEditor.tsx index 8c2113a..df47653 100644 --- a/registry/components/kri-editor/KriEditor.tsx +++ b/registry/components/kri-editor/KriEditor.tsx @@ -5,12 +5,12 @@ import { KriEditorHtmlOnly } from "./KriEditorHtmlOnly"; import { KriEditorWysiwyg } from "./KriEditorWysiwyg"; import {KriEditorSms} from "./KriEditorSms"; -function resolveMode(mode?: KriEditorMode): KriEditorMode { - return mode ?? "wysiwyg"; +function resolveMode(mode?: KriEditorMode, editorMode?: KriEditorMode): KriEditorMode { + return mode ?? editorMode ?? "wysiwyg"; } export function KriEditor(props: KriEditorProps) { - const mode = resolveMode(props.mode); + const mode = resolveMode(props.mode, props.editorMode); if (mode === "html") { return ; diff --git a/registry/components/kri-editor/KriEditorSms.tsx b/registry/components/kri-editor/KriEditorSms.tsx index 72b5cc6..91a2365 100644 --- a/registry/components/kri-editor/KriEditorSms.tsx +++ b/registry/components/kri-editor/KriEditorSms.tsx @@ -23,6 +23,7 @@ export function KriEditorSms({ changeSmsType, onEditorReady, onCommandReady, + isSmsReadOnly = false, smsMaxBytes = 90, lmsMaxBytes = 2000, }: SmsEditorProps) { @@ -100,6 +101,7 @@ export function KriEditorSms({ }} onBlur={() => flushChange(latestTextRef.current)} placeholder={placeholder} + readOnly={isSmsReadOnly} style={{ minHeight: smsTitle ? '320px' : '360px' }} {...textareaInsert.bindSelectionHandlers} /> diff --git a/registry/components/kri-editor/KriEditorWysiwyg.tsx b/registry/components/kri-editor/KriEditorWysiwyg.tsx index b1e3435..180323d 100644 --- a/registry/components/kri-editor/KriEditorWysiwyg.tsx +++ b/registry/components/kri-editor/KriEditorWysiwyg.tsx @@ -408,6 +408,7 @@ export function KriEditorWysiwyg(props: KriEditorProps) { if(onImageUploadError){ onImageUploadError(err); }else{ + toast.error("이미지 업로드에 실패했습니다."); console.error(err); } } diff --git a/registry/components/kri-editor/types.ts b/registry/components/kri-editor/types.ts index 4ad6edd..ed055a4 100644 --- a/registry/components/kri-editor/types.ts +++ b/registry/components/kri-editor/types.ts @@ -59,6 +59,7 @@ export type KriEditorProps = { debounceMs?: number smsTitle?: string changeSmsType?: (type: 'SMS' | 'LMS') => void + isSmsReadOnly?: boolean smsMaxBytes?: number lmsMaxBytes?: number toolbar?: KriEditorToolbarConfig | false