UNPKG

@guestbell/react-page-plugins

Version:

Plugins we use in GuestBell for working with amazing react-page package

24 lines (23 loc) 1.42 kB
import { Editor } from 'slate'; import { HeadingLevels } from './headingLevels'; import { omitFirstArg } from '../../types/omitFirstArg'; export declare const isHeadingActive: (editor: Editor, level: HeadingLevels) => boolean; export declare const getActiveHeadings: (editor: Editor) => HeadingLevels[]; declare const unwrapHeading: (editor: Editor) => void; declare const wrapHeading: (editor: Editor, level: HeadingLevels) => void; export interface HeadingPluginOptions { allowedHeadings?: HeadingLevels[]; headingsNames?: { [key: number]: string; }; } export declare const defaultOptions: HeadingPluginOptions; export interface HeadingsEditor { headingsConfig: HeadingPluginOptions; wrapHeading: omitFirstArg<typeof wrapHeading>; unwrapHeading: omitFirstArg<typeof unwrapHeading>; isHeadingActive: omitFirstArg<typeof isHeadingActive>; getActiveHeadings: omitFirstArg<typeof getActiveHeadings>; } export declare const withHeadings: (options?: HeadingPluginOptions) => (editor: Editor) => import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor & import("../emphasize").EmphasizeEditor & import("../links").LinksEditor & import("../color").ColorEditor & import("../alignment").AlignmentEditor & HeadingsEditor & import("../fontSize").FontSizeEditor & import("../lists").ListsEditor & import("../quote").QuotesEditor; export {};