UNPKG

@atlaskit/adf-schema

Version:

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

39 lines (38 loc) 886 B
import { adfMark, adfMarkGroup } from '@atlaskit/adf-schema-generator'; export const link = adfMark('link'); // import { linkMarketGroup } from '../groups/linkMarkGroup' would cause circular deps issue const linkMarkGroup = adfMarkGroup('link', [link]); link.define({ // it seems unnessary to have it here? excludes: [linkMarkGroup], inclusive: false, attrs: { href: { type: 'string', validatorFn: 'safeUrl' }, title: { type: 'string', optional: true }, id: { type: 'string', optional: true }, collection: { type: 'string', optional: true }, occurrenceKey: { type: 'string', optional: true }, // TODO: expand object // packages/adf-schema/src/schema/marks/link.ts __confluenceMetadata: { type: 'object', optional: true, default: null } } });