UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

33 lines (32 loc) 1.04 kB
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import { BreakoutMarkDefinition } from '../marks'; import { MarksObject, NoMark } from './types/mark'; import { NonNestableBlockContent } from './types/non-nestable-block-content'; import { NestedExpandDefinition } from './nested-expand'; /** * @name expand_node */ export interface ExpandBaseDefinition { type: 'expand'; attrs: { title?: string; __expanded?: boolean; }; /** * @minItems 1 * @allowUnsupportedBlock true */ content: Array<NonNestableBlockContent | NestedExpandDefinition>; } /** * @name expand_with_no_mark_node */ export type ExpandDefinition = ExpandBaseDefinition & NoMark; /** * @name expand_root_only_node */ export type ExpandRootOnlyDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>; export declare const expandWithNestedExpand: import("prosemirror-model").NodeSpec; export declare const toJSON: (node: PMNode) => { attrs: import("prosemirror-model").Attrs; };