import { BaseSelection, Editor, Node, Range } from 'slate'; import { MarkdownEditorProps } from '../../BaseMarkdownEditor'; import type { MarkdownEditorPlugin } from '../../plugin'; import type { EditorStore } from '../store'; /** * 处理粘贴的 Slate Markdown 片段 */ export declare const handleSlateMarkdownFragment: (editor: Editor, clipboardData: DataTransfer, currentTextSelection: BaseSelection) => boolean; /** * 处理粘贴的 HTML 内容 */ export declare const handleHtmlPaste: (editor: Editor, clipboardData: DataTransfer, editorProps: MarkdownEditorProps) => Promise; /** * 处理粘贴的文件。按 mime / 扩展名分流到 image/video/audio/attach; * 多文件一次性批量上传,避免拆成 N 次单文件请求。 */ export declare const handleFilesPaste: (editor: Editor, clipboardData: DataTransfer, editorProps: MarkdownEditorProps) => Promise; /** * 处理特殊文本格式(media:// 和 attach:// 链接) */ export declare const handleSpecialTextPaste: (editor: Editor, text: string, selection: BaseSelection) => boolean; /** * 处理 HTTP 链接 */ export declare const handleHttpLinkPaste: (editor: Editor, text: string, selection: BaseSelection, store: Pick) => boolean; /** * 处理普通文本粘贴 */ export declare const handlePlainTextPaste: (editor: Editor, text: string, selection: BaseSelection, plugins: MarkdownEditorPlugin[], allowedTypes?: string[], options?: { parseMarkdownInPlainText?: boolean; }) => Promise; /** * 检查是否需要直接插入文本(在特定节点类型中) */ export declare const shouldInsertTextDirectly: (editor: Editor, selection: BaseSelection) => boolean; /** * 处理标签节点的粘贴 */ export declare const handleTagNodePaste: (editor: Editor, currentTextSelection: Range, clipboardData: DataTransfer, curNode: Node & { tag?: boolean | null; }) => boolean;