@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
31 lines (30 loc) • 792 B
TypeScript
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
import { AnnotationMarkDefinition } from '../marks/annotation';
export declare enum USER_TYPES {
DEFAULT = "DEFAULT",
SPECIAL = "SPECIAL",
APP = "APP"
}
export type UserType = keyof typeof USER_TYPES;
export interface MentionAttributes {
id: string;
text?: string;
userType?: UserType;
accessLevel?: string;
localId?: string;
}
/**
* @name mention_node
*/
export interface MentionDefinition {
type: 'mention';
attrs: MentionAttributes;
/**
* @stage 0
*/
marks?: Array<AnnotationMarkDefinition>;
}
export declare const mention: import("prosemirror-model").NodeSpec;
export declare const toJSON: (node: PMNode) => {
attrs: import("prosemirror-model").Attrs;
};