UNPKG

@atlaskit/adf-schema

Version:

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

40 lines (39 loc) 1.04 kB
import { MarkSpec, Mark } from '@atlaskit/editor-prosemirror/model'; export interface ConfluenceLinkMetadata { linkType: string; versionAtSave?: string | null; fileName?: string | null; spaceKey?: string | null; contentTitle?: string | null; isRenamedTitle?: boolean; anchorName?: string | null; contentId?: string | null; container?: ConfluenceLinkMetadata; } export interface LinkAttributes { /** * @validatorFn safeUrl */ href: string; title?: string; id?: string; collection?: string; occurrenceKey?: string; __confluenceMetadata?: ConfluenceLinkMetadata; } /** * @name link_mark */ export interface LinkDefinition { type: 'link'; attrs: LinkAttributes; } export declare const getLinkAttrs: (attribute: string) => (domNode: Node | string) => false | { __confluenceMetadata: string; href?: string; }; export declare const link: MarkSpec; export declare const toJSON: (mark: Mark) => { type: string; attrs: Record<string, string>; };