reiji-h 2 лет назад
Родитель
Сommit
bc85e0f5d9

+ 2 - 4
packages/editor/src/components/CodeMirrorEditor/CodeMirrorEditor.tsx

@@ -16,13 +16,11 @@ import {
 import {
   adjustPasteData, getStrFromBol,
 } from '../../services/paste-util/paste-markdown-util';
-import { useCodeMirrorEditorIsolated } from '../../stores';
+import { useCodeMirrorEditorIsolated, useEditorSettings } from '../../stores';
 
 import { Toolbar } from './Toolbar';
 
 
-import { useEditorSettings } from 'src/stores/use-editor-settings';
-
 import style from './CodeMirrorEditor.module.scss';
 
 const CodeMirrorEditorContainer = forwardRef<HTMLDivElement>((props, ref) => {
@@ -33,7 +31,7 @@ const CodeMirrorEditorContainer = forwardRef<HTMLDivElement>((props, ref) => {
 
 export type CodeMirrorEditorProps = {
   acceptedUploadFileType?: AcceptedUploadFileType,
-  indentSize: number,
+  indentSize?: number,
   editorSettings?: EditorSettings,
   onChange?: (value: string) => void,
   onSave?: () => void,

+ 1 - 0
packages/editor/src/stores/index.ts

@@ -1,3 +1,4 @@
 export * from './codemirror-editor';
 export * from './use-resolved-theme';
 export * from './use-collaborative-editor-mode';
+export * from './use-editor-settings';