import { Editor, Node, Path } from 'slate'; import { CustomElement, InsertNodesOptions, WrapNodesOptions } from '../types'; /** * 插入节点 * @param editor * @param element * @param options */ export declare const insertNodes: (editor?: any, element?: any, options?: InsertNodesOptions) => void; /** * 包裹节点 * @param editor * @param element * @param options * @returns */ export declare const wrapNodes: (editor?: Editor, element?: CustomElement, options?: WrapNodesOptions) => Promise; /** * 拆开节点 * @param editor * @param nodes */ export declare const unwrapNodes: (editor?: Editor | null, path?: Path, cb?: () => void) => void; /** * 节点设置新的属性 * @param editor * @param nodeProps 新节点属性 * @param options 设置的节点路径 */ export declare const setNodes: (editor: Editor, nodeProps: Partial, options: { at: Path; }) => void; /** * 替换节点 * @param editor * @param node 新节点 * @param path 久节点路径 */ export declare const replaceNode: (editor: Editor, node: Node, path: Path) => void; /** * 重新设置全文内容,content不传则清空全文 * @param editor * @param content */ export declare const setEditorContent: (editor?: Editor | null, content?: Array) => void; /** * 获取节点字符串内容 * @param {Node[]} nodes * @returns {Node[]} */ export declare const nodeStringify: (nodes?: Node[]) => string; /** * 深克隆对象(不涉及克隆undefined、function、symbol等类型属性) * @param {object | array | string | number} obj * @returns {object | array | string | number} */ export declare const copyObject: (object: T) => T; /** * 获取标签对应名称文本 * @param {CustomElement} element * @return {string} */ export declare const getTagNameText: () => string; export declare const mapRender: (list: any) => any; export declare const renderTime: (time?: number) => string; export declare const covertTime: (time: number) => string; export declare const findNodePath: (editor?: any, item?: Node) => Path; export declare const setCursorRemove: (editor?: any) => void;