Skip to content

Commit 895f46a

Browse files
committed
Fix markdown preview issue.
1 parent e62eaf3 commit 895f46a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/MDEditor.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export class MDEditor extends React.PureComponent<MDEditorProps, IMDEditorState>
152152
[`${prefixCls}-show-${this.state.preview}`]: this.state.preview,
153153
[`${prefixCls}-fullscreen`]: this.state.fullscreen,
154154
});
155+
console.log('this.state.preview:', this.state.preview);
155156
return (
156157
<div className={cls} style={{ height: this.state.fullscreen ? '100%' : this.state.height }} {...other}>
157158
<Toolbar
@@ -181,14 +182,12 @@ export class MDEditor extends React.PureComponent<MDEditorProps, IMDEditorState>
181182
onChange={this.handleChange.bind(this)}
182183
/>
183184
)}
184-
{/(preview|live)/.test(this.state.preview as string) && (
185-
<MarkdownPreview
186-
{...previewOptions}
187-
ref={this.preview}
188-
onScroll={this.handleScroll}
189-
className={`${prefixCls}-preview`}
190-
/>
191-
)}
185+
<MarkdownPreview
186+
{...previewOptions}
187+
ref={this.preview}
188+
onScroll={this.handleScroll}
189+
className={`${prefixCls}-preview`}
190+
/>
192191
{visiableDragbar && !this.state.fullscreen && (
193192
<DragBar
194193
prefixCls={prefixCls}

0 commit comments

Comments
 (0)