@udecode/plate-heading
Version:
Headings plugin for Plate
29 lines (23 loc) • 1.05 kB
text/typescript
import { H as Heading } from './types-DBDYSKgi.mjs';
export { B as BaseHeadingPlugin, b as HeadingConfig, a as HeadingLevel } from './types-DBDYSKgi.mjs';
import * as _udecode_plate_core from '@udecode/plate-core';
import { PluginConfig, SlateEditor, InsertNodesOptions, TNode } from '@udecode/plate-common';
import 'slate';
type TocConfig = PluginConfig<'toc', {
isScroll: boolean;
topOffset: number;
queryHeading?: (editor: SlateEditor) => Heading[];
}>;
declare const BaseTocPlugin: _udecode_plate_core.SlatePlugin<TocConfig>;
declare const HEADING_KEYS: {
readonly h1: "h1";
readonly h2: "h2";
readonly h3: "h3";
readonly h4: "h4";
readonly h5: "h5";
readonly h6: "h6";
};
declare const HEADING_LEVELS: ("h1" | "h2" | "h3" | "h4" | "h5" | "h6")[];
declare const insertToc: <E extends SlateEditor>(editor: E, options?: InsertNodesOptions<E>) => void;
declare const isHeading: (node: TNode) => unknown;
export { BaseTocPlugin, HEADING_KEYS, HEADING_LEVELS, Heading, type TocConfig, insertToc, isHeading };