UNPKG

927 BTypeScriptView Raw
1import { NodeSpec, Node as PMNode } from 'prosemirror-model';
2import { BreakoutMarkDefinition } from '../marks';
3import { MarksObject, NoMark } from './types/mark';
4import { NonNestableBlockContent } from './types/non-nestable-block-content';
5/**
6 * @name expand_node
7 */
8export interface ExpandBaseDefinition {
9 type: 'expand';
10 attrs: {
11 title?: string;
12 };
13 /**
14 * @minItems 1
15 * @allowUnsupportedBlock true
16 */
17 content: Array<NonNestableBlockContent>;
18 marks?: Array<any>;
19}
20/**
21 * @name expand_with_no_mark_node
22 */
23export declare type ExpandDefinition = ExpandBaseDefinition & NoMark;
24/**
25 * @name expand_with_breakout_mark_node
26 */
27export declare type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
28export declare const expand: NodeSpec;
29export declare const toJSON: (node: PMNode) => {
30 attrs: {
31 [key: string]: any;
32 };
33};