Skip to content

Commit b1054cd

Browse files
authored
Update index.tsx
add this.props.className to render function
1 parent 65ec89f commit b1054cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/editor/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ interface EditorProps extends EditorConfig {
2424
autoFocus?: boolean;
2525
placeholder?: string;
2626
readOnly?: boolean;
27+
className?: string;
2728
config?: any;
2829
plugins?: string[];
2930
// Configs
@@ -821,7 +822,7 @@ class Editor extends React.Component<EditorProps, EditorState> {
821822
const editorId = id ? `${id}_md` : undefined;
822823
const previewerId = id ? `${id}_html` : undefined;
823824
return (
824-
<div id={id} className={`rc-md-editor ${fullScreen ? 'full' : ''}`} style={this.props.style} onKeyDown={this.handleKeyDown} onDrop={this.handleDrop}>
825+
<div id={id} className={`rc-md-editor ${fullScreen ? 'full' : ''} ${this.props.className ?? ''}`} style={this.props.style} onKeyDown={this.handleKeyDown} onDrop={this.handleDrop}>
825826
<NavigationBar visible={isShowMenu} left={getPluginAt('left')} right={getPluginAt('right')} />
826827
<div className="editor-container">
827828
{showHideMenu && (

0 commit comments

Comments
 (0)