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 type { MarkSpec, Mark } from '@atlaskit/editor-prosemirror/model'; export interface ConfluenceLinkMetadata { anchorName?: string | null; container?: ConfluenceLinkMetadata; contentId?: string | null; contentTitle?: string | null; fileName?: string | null; isRenamedTitle?: boolean; linkType: string; spaceKey?: string | null; versionAtSave?: string | null; } export interface LinkAttributes { __confluenceMetadata?: ConfluenceLinkMetadata; collection?: string; /** * @validatorFn safeUrl */ href: string; id?: string; occurrenceKey?: string; title?: string; } /** * @name link_mark */ export interface LinkDefinition { attrs: LinkAttributes; type: 'link'; } 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>; };