@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
34 lines • 860 B
JavaScript
import { adfNode } from '@atlaskit/adf-schema-generator';
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: 'enum',
values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green'],
default: ''
},
localId: {
type: 'string',
optional: true,
default: ''
},
style: {
type: 'string',
optional: true,
default: ''
}
},
stage0: {
marks: [unsupportedNodeAttribute, unsupportedMark, annotation]
}
});