|
@@ -4,8 +4,8 @@ import { EditorView } from '@codemirror/view';
|
|
|
|
|
|
|
|
export type InsertText = (text: string) => void;
|
|
export type InsertText = (text: string) => void;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
export const useInsertText = (view?: EditorView): InsertText => {
|
|
export const useInsertText = (view?: EditorView): InsertText => {
|
|
|
|
|
+
|
|
|
return useCallback((text) => {
|
|
return useCallback((text) => {
|
|
|
if (view == null) {
|
|
if (view == null) {
|
|
|
return;
|
|
return;
|