Skip to content

Commit ef7cc18

Browse files
committed
fix: MarkdownEditor에 누락된 props 추가
1 parent 18e4781 commit ef7cc18

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/common/src/components/md_editor.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import * as React from "react";
44

55
type MDEditorProps = {
66
disabled?: boolean;
7+
name?: string;
8+
value?: string;
79
defaultValue?: string;
810
onChange?: (value?: string) => void;
911
extraCommands?: ICommand[];
@@ -21,16 +23,17 @@ const TextEditorStyle: React.CSSProperties = {
2123
fieldSizing: "content",
2224
} as React.CSSProperties;
2325

24-
export const MarkdownEditor: React.FC<MDEditorProps> = ({ disabled, defaultValue, onChange, extraCommands }) => (
26+
export const MarkdownEditor: React.FC<MDEditorProps> = ({ disabled, name, defaultValue, value, onChange, extraCommands }) => (
2527
<Stack direction="column" spacing={2} sx={{ width: "100%", height: "100%", maxWidth: "100%" }}>
2628
<MDEditor
2729
data-color-mode="light"
28-
textareaProps={{ disabled }}
30+
textareaProps={{ disabled, name }}
2931
preview="edit"
3032
highlightEnable={true}
3133
height="none"
3234
minHeight={100}
33-
value={defaultValue}
35+
defaultValue={defaultValue}
36+
value={value}
3437
onChange={onChange}
3538
commands={[
3639
commands.group([commands.title1, commands.title2, commands.title3, commands.title4, commands.title5, commands.title6], {

0 commit comments

Comments
 (0)