@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
42 lines (41 loc) • 1.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.embedCard = void 0;
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
var _unsupportedMark = require("../marks/unsupportedMark");
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
var embedCard = exports.embedCard = (0, _adfSchemaGenerator.adfNode)('embedCard').define({
selectable: true,
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
attrs: {
url: {
type: 'string',
default: '',
validatorFn: 'safeUrl'
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
default: 'center'
},
width: {
type: 'number',
maximum: 100,
minimum: 0,
default: 100,
optional: true
},
originalHeight: {
type: 'number',
default: null,
optional: true
},
originalWidth: {
type: 'number',
default: null,
optional: true
}
}
});