UNPKG

@atlaskit/adf-schema

Version:

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

34 lines • 874 B
import { adfNode } from '@atlaskit/adf-schema-generator/adfNode'; import { annotation } from '../marks/annotation'; import { unsupportedMark } from '../marks/unsupportedMark'; import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute'; export const status = adfNode('status').define({ inline: true, selectable: true, marks: [unsupportedNodeAttribute, unsupportedMark], attrs: { text: { minLength: 1, type: 'string', default: '' }, color: { type: 'string', pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$', default: '' }, localId: { type: 'string', optional: true, default: '' }, style: { type: 'string', optional: true, default: '' } }, stage0: { marks: [unsupportedNodeAttribute, unsupportedMark, annotation] } });