import { Text, BaseElement, Editor, BaseEditor, Descendant, Path } from 'slate'; import { ReactEditor } from 'slate-react'; import { HistoryEditor } from 'slate-history'; import { Tools } from '../parts/ToolPanel/ToolPanel.types'; interface TextNode { text: string; bold?: boolean; italic?: boolean; underline?: boolean; strike?: boolean; subscript?: boolean; superscript?: boolean; color?: string; backgroundColor?: string; } interface CustomElement extends BaseElement { type: string; children: BaseElement[]; } export interface LinkElement { type: string; text?: string; url: string; target: string; children: Text[]; } interface TextNode { text: string; color?: string; backgroundColor?: string; } interface ElementNode { type: string; align?: string; url?: string; target?: string; children: Array; } interface LinkElementsInRage { path: Path; node: ElementNode; } export declare const withLists: (editor: BaseEditor & ReactEditor & HistoryEditor) => BaseEditor & ReactEditor & HistoryEditor; export declare const resetFormatting: (editor: Editor) => void; export declare const serialize: (node: TextNode | ElementNode) => string; export declare const thereIsLink: (editor: Editor) => boolean; export declare const isLink: (editor: Editor) => boolean; export declare const retriveLinkDataWithoutRange: (editor: Editor) => CustomElement | null; export declare const makeLink: (editor: Editor, url: string, target: string) => void; export declare const getOnlySelectedLink: (editor: Editor) => LinkElementsInRage[] | undefined; export declare const findLinkNodesInRange: (editor: Editor) => LinkElementsInRage[]; export declare const editorLink: (editor: Editor, url: string, target: string) => void; export declare const unwrapLink: (editor: Editor) => void; export declare const withInlines: (editor: BaseEditor & ReactEditor & HistoryEditor) => BaseEditor & ReactEditor & HistoryEditor; export declare const deserializeHTML: (htmlString: string) => Descendant[]; export declare const distributeTools: (numberTopTools: number, toolsList: Tools) => { top: Tools; context: Tools; }; export declare const nameOfTool: (format: string) => { icon: string; title: string; }; export declare const doesContextHaveTools: (tools: Tools) => boolean; export declare const formatColors: (color: string) => "" | "color" | "backgroundColor"; export declare const nestListItem: (editor: Editor) => void; export declare const unnestListItem: (editor: Editor) => void; export declare const outdentListItem: (editor: Editor) => void; export { ElementNode };