diff --git a/src/lib/editor/imagePreviewPlugin.ts b/src/lib/editor/imagePreviewPlugin.ts index 5bd6739..3141b8e 100644 --- a/src/lib/editor/imagePreviewPlugin.ts +++ b/src/lib/editor/imagePreviewPlugin.ts @@ -35,7 +35,6 @@ class ImagePreviewWidget extends WidgetType { } } - function getImageDecorationsForState(state: EditorState) { const widgets: Range[] = []; @@ -44,7 +43,7 @@ function getImageDecorationsForState(state: EditorState) { name: string; from: number; to: number; - node: { getChild: (type: string) => any }; + node: { getChild: (type: string) => { from: number; to: number } | null }; }) => { if (node.name === 'Image') { // 查找图片语法中的 URL 节点