260728_05_ENH: 에디터 동적 툴바 사용가능하도록 수정
This commit is contained in:
@@ -5,19 +5,19 @@ 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 <KriEditorHtmlOnly {...props} mode={mode} />;
|
||||
}
|
||||
|
||||
if(mode === "sms") {
|
||||
return <KriEditorSms {...props} mode={mode} />;
|
||||
return <KriEditorSms {...props} mode={mode} />
|
||||
}
|
||||
|
||||
return <KriEditorWysiwyg {...props} mode={mode} />;
|
||||
|
||||
Reference in New Issue
Block a user