|
|
@@ -23,6 +23,8 @@ import { Toolbar } from './Toolbar';
|
|
|
|
|
|
import style from './CodeMirrorEditor.module.scss';
|
|
|
|
|
|
+const moduleClass = style['codemirror-editor'];
|
|
|
+
|
|
|
|
|
|
// Fix IME cursor position issue by EditContext
|
|
|
// ref: https://github.com/weseek/growi/pull/9267
|
|
|
@@ -54,12 +56,14 @@ export type CodeMirrorEditorProps = {
|
|
|
|
|
|
type Props = CodeMirrorEditorProps & {
|
|
|
editorKey: string | GlobalCodeMirrorEditorKey,
|
|
|
+ className?: string,
|
|
|
hideToolbar?: boolean,
|
|
|
}
|
|
|
|
|
|
export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
const {
|
|
|
editorKey,
|
|
|
+ className,
|
|
|
hideToolbar,
|
|
|
|
|
|
cmProps,
|
|
|
@@ -217,7 +221,7 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
}, [isUploading, isDragAccept, isDragReject, acceptedUploadFileType]);
|
|
|
|
|
|
return (
|
|
|
- <div className={`${style['codemirror-editor']} flex-expand-vert overflow-y-hidden`}>
|
|
|
+ <div className={`${className} ${moduleClass} flex-expand-vert overflow-y-hidden`}>
|
|
|
<div {...getRootProps()} className={`dropzone ${fileUploadState} flex-expand-vert`}>
|
|
|
<input {...getInputProps()} />
|
|
|
<FileDropzoneOverlay isEnabled={isDragActive} />
|