@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
31 lines (30 loc) • 875 B
TypeScript
import type { Mark, MarkSpec } from '@atlaskit/editor-prosemirror/model';
export type LocalId = string;
export interface FragmentAttributes {
/**
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
* @minLength 1
*/
localId: LocalId;
name?: string;
}
/**
* @name fragment_mark
* @description Indicates that the elements decorated with this mark belong to a "fragment" entity, which represents a collection of ADF nodes.
* This entity can be referred to later by its `localId` attribute.
*/
export interface FragmentDefinition {
attrs: FragmentAttributes;
type: 'fragment';
}
export interface FragmentMark extends Mark {
attrs: FragmentAttributes;
}
export declare const fragment: MarkSpec;
export declare const toJSON: (mark: Mark) => {
attrs: {
localId: any;
name?: any;
};
type: string;
};