|
@@ -21,7 +21,6 @@ import { useInsertMarkdownElements, type InsertMarkdowElements } from './utils/i
|
|
|
import { useInsertPrefix, type InsertPrefix } from './utils/insert-prefix';
|
|
import { useInsertPrefix, type InsertPrefix } from './utils/insert-prefix';
|
|
|
import { useInsertText, type InsertText } from './utils/insert-text';
|
|
import { useInsertText, type InsertText } from './utils/insert-text';
|
|
|
import { useReplaceText, type ReplaceText } from './utils/replace-text';
|
|
import { useReplaceText, type ReplaceText } from './utils/replace-text';
|
|
|
-import { useScrollIntoView, type ScrollIntoView } from './utils/scroll-into-view';
|
|
|
|
|
import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
|
|
import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
|
|
|
|
|
|
|
|
|
|
|
|
@@ -44,7 +43,6 @@ type UseCodeMirrorEditorUtils = {
|
|
|
replaceText: ReplaceText,
|
|
replaceText: ReplaceText,
|
|
|
insertMarkdownElements: InsertMarkdowElements,
|
|
insertMarkdownElements: InsertMarkdowElements,
|
|
|
insertPrefix: InsertPrefix,
|
|
insertPrefix: InsertPrefix,
|
|
|
- scrollIntoView: ScrollIntoView,
|
|
|
|
|
}
|
|
}
|
|
|
export type UseCodeMirrorEditor = {
|
|
export type UseCodeMirrorEditor = {
|
|
|
state: EditorState | undefined;
|
|
state: EditorState | undefined;
|
|
@@ -100,7 +98,6 @@ export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor
|
|
|
const replaceText = useReplaceText(view);
|
|
const replaceText = useReplaceText(view);
|
|
|
const insertMarkdownElements = useInsertMarkdownElements(view);
|
|
const insertMarkdownElements = useInsertMarkdownElements(view);
|
|
|
const insertPrefix = useInsertPrefix(view);
|
|
const insertPrefix = useInsertPrefix(view);
|
|
|
- const scrollIntoView = useScrollIntoView(view);
|
|
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
state,
|
|
state,
|
|
@@ -114,6 +111,5 @@ export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor
|
|
|
replaceText,
|
|
replaceText,
|
|
|
insertMarkdownElements,
|
|
insertMarkdownElements,
|
|
|
insertPrefix,
|
|
insertPrefix,
|
|
|
- scrollIntoView,
|
|
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|