@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
35 lines (34 loc) • 1.12 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.inlineCard = void 0;
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
var _annotation = require("../marks/annotation");
var _unsupportedMark = require("../marks/unsupportedMark");
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
var inlineCard = exports.inlineCard = (0, _adfSchemaGenerator.adfNode)('inlineCard').define({
inline: true,
selectable: true,
draggable: true,
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
attrs: {
anyOf: [{
url: {
type: 'string',
default: null,
validatorFn: 'safeUrl'
}
}, {
data: {
type: 'object',
default: null
}
}]
},
stage0: {
marks: [_annotation.annotation, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark]
}
}).variant('with_annotation', {
marks: [_annotation.annotation, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute]
});