UNPKG

react-smart-editor

Version:
36 lines 1.3 kB
import { Editor } from 'slate'; export declare const TEXT_ALIGN_TYPES: string[]; export declare const LIST_TYPES: string[]; export declare const HEADING_TYPES: string[]; /** * Checks if the format is active in the current block * @param editor - Current editor * @param format - Format to check * @returns true if format is active, false otherwise */ export declare const isFormatActive: (editor: Editor, format: string) => boolean; /** * Toggles the format in the current block * @param editor - Current editor * @param format - Format to toggle */ export declare const toggleFormat: (editor: Editor, format: string) => void; /** * Toggles the block format * @param editor - Current editor * @param format - Format to toggle */ export declare const toggleBlock: (editor: Editor, format: string) => void; /** * Gets the current block type * @param editor - Current editor * @returns Current block type */ export declare const getCurrentBlockType: (editor: Editor) => "paragraph" | "heading-one" | "heading-two" | "heading-three" | "list-item" | "bulleted-list" | "numbered-list"; /** * Gets the current color * @param editor - Current editor * @returns Current color */ export declare const getCurrentColor: (editor: Editor) => string; //# sourceMappingURL=formatting.d.ts.map