UNPKG

@atlaskit/adf-schema

Version:

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

24 lines 603 B
import { adfMark } from '@atlaskit/adf-schema-generator'; import { adfMarkGroup } from '@atlaskit/adf-schema-generator'; export const backgroundColor = adfMark('backgroundColor'); export const textColor = adfMark('textColor'); export const colorGroup = adfMarkGroup('color', [textColor, backgroundColor]); backgroundColor.define({ inclusive: true, excludes: [colorGroup], attrs: { color: { pattern: '^#[0-9a-fA-F]{6}$', type: 'string' } } }); textColor.define({ inclusive: true, attrs: { color: { type: 'string', pattern: '^#[0-9a-fA-F]{6}$' } } });