UNPKG

1.13 kBTypeScriptView Raw
1import { NodeSpec } from 'prosemirror-model';
2import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
3import { MarksObject, NoMark } from './types/mark';
4import { Inline } from './types/inline-content';
5/**
6 * @name heading_node
7 */
8export interface HeadingBaseDefinition {
9 type: 'heading';
10 /**
11 * @allowUnsupportedInline true
12 */
13 content?: Array<Inline>;
14 marks?: Array<any>;
15 attrs: {
16 /**
17 * @minimum 1
18 * @maximum 6
19 */
20 level: number;
21 };
22}
23/**
24 * @name heading_with_no_marks_node
25 */
26export declare type HeadingDefinition = HeadingBaseDefinition & NoMark;
27/**
28 * @name heading_with_alignment_node
29 */
30export declare type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject<AlignmentMarkDefinition>;
31/**
32 * @name heading_with_indentation_node
33 */
34export declare type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
35export declare type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
36export declare const heading: NodeSpec;