diff --git a/src/MarkdownEditor/editor/Editor.tsx b/src/MarkdownEditor/editor/Editor.tsx index 3ac52ed..3b92c3b 100644 --- a/src/MarkdownEditor/editor/Editor.tsx +++ b/src/MarkdownEditor/editor/Editor.tsx @@ -616,9 +616,11 @@ export const MEditor = observer( reportMode ? { fontSize: 16, + ...editorProps.style, } : { fontSize: 14, + ...editorProps.style, } } onMouseDown={checkEnd} diff --git a/src/MarkdownEditor/index.tsx b/src/MarkdownEditor/index.tsx index e6a3406..4184b76 100644 --- a/src/MarkdownEditor/index.tsx +++ b/src/MarkdownEditor/index.tsx @@ -147,6 +147,7 @@ export type MarkdownEditorProps = { */ style?: React.CSSProperties; contentStyle?: React.CSSProperties; + editorStyle?: React.CSSProperties; /** * 是否显示目录 */ @@ -258,6 +259,7 @@ export const MarkdownEditor: React.FC = (props) => { readonly, style, contentStyle, + editorStyle, height, ...rest } = props; @@ -418,6 +420,7 @@ export const MarkdownEditor: React.FC = (props) => { prefixCls={baseClassName} note={instance.current!} {...rest} + style={editorStyle} instance={instance} /> {readonly ? ( diff --git a/src/Slides/index.tsx b/src/Slides/index.tsx index c8cf5cf..722ac62 100644 --- a/src/Slides/index.tsx +++ b/src/Slides/index.tsx @@ -57,6 +57,10 @@ export function Slides(props: { initValue: string }) { margin: 0, width: '100%', }} + editorStyle={{ + maxHeight: '80vh', + overflow: 'auto', + }} contentStyle={{ width: '100%', padding: 0,