@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
39 lines (38 loc) • 1.11 kB
TypeScript
import { NodeSpec } from 'prosemirror-model';
import { ParagraphDefinition as Paragraph } from './paragraph';
import { OrderedListDefinition as OrderedList } from './types/list';
import { BulletListDefinition as BulletList } from './types/list';
import { HeadingDefinition as Heading } from './heading';
import { BlockCardDefinition as BlockCard } from './block-card';
export declare enum PanelType {
INFO = "info",
NOTE = "note",
TIP = "tip",
WARNING = "warning",
ERROR = "error",
SUCCESS = "success",
CUSTOM = "custom"
}
export interface PanelAttributes {
panelType: PanelType;
panelIcon?: string;
panelIconId?: string;
panelIconText?: string;
panelColor?: string;
}
/**
* @name panel_node
*/
export interface PanelDefinition {
type: 'panel';
attrs: PanelAttributes;
/**
* @minItems 1
* @allowUnsupportedBlock true
*/
content: Array<Paragraph | Heading | OrderedList | BulletList | BlockCard>;
}
export interface DOMAttributes {
[propName: string]: string;
}
export declare const panel: (allowCustomPanel: boolean) => NodeSpec;