@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
34 lines (33 loc) • 927 B
TypeScript
import { NodeSpec, Node as PMNode } from 'prosemirror-model';
import { BreakoutMarkDefinition } from '../marks';
import { MarksObject, NoMark } from './types/mark';
import { NonNestableBlockContent } from './types/non-nestable-block-content';
/**
* @name expand_node
*/
export interface ExpandBaseDefinition {
type: 'expand';
attrs: {
title?: string;
};
/**
* @minItems 1
* @allowUnsupportedBlock true
*/
content: Array<NonNestableBlockContent>;
marks?: Array<any>;
}
/**
* @name expand_with_no_mark_node
*/
export declare type ExpandDefinition = ExpandBaseDefinition & NoMark;
/**
* @name expand_with_breakout_mark_node
*/
export declare type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
export declare const expand: NodeSpec;
export declare const toJSON: (node: PMNode) => {
attrs: {
[key: string]: any;
};
};