|
|
@@ -41,11 +41,13 @@ export type CodeMirrorEditorProps = {
|
|
|
|
|
|
type Props = CodeMirrorEditorProps & {
|
|
|
editorKey: string | GlobalCodeMirrorEditorKey,
|
|
|
+ hideToolbar?: boolean,
|
|
|
}
|
|
|
|
|
|
export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
const {
|
|
|
editorKey,
|
|
|
+ hideToolbar,
|
|
|
acceptedUploadFileType = AcceptedUploadFileType.NONE,
|
|
|
indentSize,
|
|
|
editorSettings,
|
|
|
@@ -209,11 +211,13 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
<FileDropzoneOverlay isEnabled={isDragActive} />
|
|
|
<CodeMirrorEditorContainer ref={containerRef} />
|
|
|
</div>
|
|
|
- <Toolbar
|
|
|
- editorKey={editorKey}
|
|
|
- acceptedUploadFileType={acceptedUploadFileType}
|
|
|
- onUpload={onUpload}
|
|
|
- />
|
|
|
+ { !hideToolbar && (
|
|
|
+ <Toolbar
|
|
|
+ editorKey={editorKey}
|
|
|
+ acceptedUploadFileType={acceptedUploadFileType}
|
|
|
+ onUpload={onUpload}
|
|
|
+ />
|
|
|
+ ) }
|
|
|
</div>
|
|
|
);
|
|
|
};
|