File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ const Fullscreen: React.FC<{ command: ICommand; editorProps: IMarkdownEditor & T
52
52
if ( editorProps && editorProps . container && editorProps . container . current && editorProps . editor ) {
53
53
const container = editorProps . container . current ;
54
54
document . body . style . overflow = full ? 'hidden' : 'initial' ;
55
+ full
56
+ ? document . body . classList . add ( `${ editorProps . prefixCls } -fullscreen` )
57
+ : document . body . classList . remove ( `${ editorProps . prefixCls } -fullscreen` ) ;
55
58
if ( container && full ) {
56
59
container . style . zIndex = '999' ;
57
60
container . style . position = 'fixed' ;
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export default function ToolBar(props: IToolBarProps) {
34
34
execute ( editor . current ! ) ;
35
35
}
36
36
}
37
+ editorProps . prefixCls = prefixCls ;
37
38
return (
38
39
< div
39
40
className = { `${ prefixCls } -toolbar ${ className || '' } ${ mode ? `${ prefixCls } -toolbar-mode` : '' } ` }
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ export interface IMarkdownEditor extends ReactCodeMirrorProps {
56
56
}
57
57
58
58
export interface ToolBarProps {
59
+ prefixCls ?: string ;
59
60
editor : React . RefObject < ReactCodeMirrorRef > ;
60
61
preview : React . RefObject < HTMLDivElement > ;
61
62
container : React . RefObject < HTMLDivElement > ;
@@ -122,6 +123,7 @@ function MarkdownEditorInternal(
122
123
) ;
123
124
124
125
const toolBarProps : ToolBarProps = {
126
+ prefixCls,
125
127
preview : preview ,
126
128
editor : codeMirror ,
127
129
container : container ,
You can’t perform that action at this time.
0 commit comments