UNPKG

@plait/text-plugins

Version:

#### Dependence - `@plait/core`

15 lines (14 loc) 685 B
import { Editor, Element } from 'slate'; import { FontSizes, MarkTypes } from './types'; export interface MarkEditor extends Editor { removeMark: (key: string, shouldChange?: boolean) => void; } export declare const PlaitMarkEditor: { getMarks(editor: Editor): any; getMarksByElement(element: Element): any; isMarkActive(editor: Editor, format: MarkTypes): boolean | undefined; toggleMark(editor: Editor, format: MarkTypes): void; setFontSizeMark(editor: Editor, size: FontSizes, defaultSize?: number): void; setColorMark(editor: Editor, color: string | null, defaultTextColor?: string): void; }; export declare function setSelection(editor: Editor): void;