|
|
@@ -14,7 +14,7 @@ import { useAppendExtensions, type AppendExtensions } from './utils/append-exten
|
|
|
import { useFocus, type Focus } from './utils/focus';
|
|
|
import { useGetDoc, type GetDoc } from './utils/get-doc';
|
|
|
import { useInitDoc, type InitDoc } from './utils/init-doc';
|
|
|
-import { useInsertMarkdownText, type InsertMarkdownText } from './utils/insert-markdown-text';
|
|
|
+import { useInsertMarkdownElements, type InsertMarkdowElements } from './utils/insert-markdown-elements';
|
|
|
import { useInsertText, type InsertText } from './utils/insert-text';
|
|
|
import { useReplaceText, type ReplaceText } from './utils/replace-text';
|
|
|
import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
|
|
|
@@ -36,7 +36,7 @@ type UseCodeMirrorEditorUtils = {
|
|
|
setCaretLine: SetCaretLine,
|
|
|
insertText: InsertText,
|
|
|
replaceText: ReplaceText,
|
|
|
- insertMarkdownText: InsertMarkdownText,
|
|
|
+ insertMarkdownElements: InsertMarkdowElements,
|
|
|
}
|
|
|
export type UseCodeMirrorEditor = {
|
|
|
state: EditorState | undefined;
|
|
|
@@ -85,7 +85,7 @@ export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor
|
|
|
const setCaretLine = useSetCaretLine(view);
|
|
|
const insertText = useInsertText(view);
|
|
|
const replaceText = useReplaceText(view);
|
|
|
- const insertMarkdownText = useInsertMarkdownText(view);
|
|
|
+ const insertMarkdownElements = useInsertMarkdownElements(view);
|
|
|
|
|
|
return {
|
|
|
state,
|
|
|
@@ -97,6 +97,6 @@ export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor
|
|
|
setCaretLine,
|
|
|
insertText,
|
|
|
replaceText,
|
|
|
- insertMarkdownText,
|
|
|
+ insertMarkdownElements,
|
|
|
};
|
|
|
};
|