UNPKG

792 BTypeScriptView Raw
1import { Mark, MarkSpec } from 'prosemirror-model';
2export declare type LocalId = string;
3export interface FragmentAttributes {
4 /**
5 * @minLength 1
6 */
7 localId: LocalId;
8 name?: string;
9}
10/**
11 * @name fragment_mark
12 * @description Indicates that the elements decorated with this mark belong to a "fragment" entity, which represents a collection of ADF nodes.
13 * This entity can be referred to later by its `localId` attribute.
14 */
15export interface FragmentDefinition {
16 type: 'fragment';
17 attrs: FragmentAttributes;
18}
19export interface FragmentMark extends Mark {
20 attrs: FragmentAttributes;
21}
22export declare const fragment: MarkSpec;
23export declare const toJSON: (mark: Mark) => {
24 type: string;
25 attrs: {
26 name?: any;
27 localId: any;
28 };
29};