@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
29 lines • 806 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 var inlineCard = adfNode('inlineCard').define({
inline: true,
selectable: true,
draggable: true,
marks: [unsupportedMark, unsupportedNodeAttribute],
attrs: {
anyOf: [{
url: {
type: 'string',
default: null,
validatorFn: 'safeUrl'
}
}, {
data: {
type: 'object',
default: null
}
}]
},
stage0: {
marks: [annotation, unsupportedNodeAttribute, unsupportedMark]
}
}).variant('with_annotation', {
marks: [annotation, unsupportedMark, unsupportedNodeAttribute]
});