@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
37 lines (36 loc) • 1.13 kB
TypeScript
import { NodeSpec } from 'prosemirror-model';
import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
import { MarksObject, NoMark } from './types/mark';
import { Inline } from './types/inline-content';
/**
* @name heading_node
*/
export interface HeadingBaseDefinition {
type: 'heading';
/**
* @allowUnsupportedInline true
*/
content?: Array<Inline>;
marks?: Array<any>;
attrs: {
/**
* @minimum 1
* @maximum 6
*/
level: number;
};
}
/**
* @name heading_with_no_marks_node
*/
export declare type HeadingDefinition = HeadingBaseDefinition & NoMark;
/**
* @name heading_with_alignment_node
*/
export declare type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject<AlignmentMarkDefinition>;
/**
* @name heading_with_indentation_node
*/
export declare type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
export declare type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
export declare const heading: NodeSpec;