@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
101 lines (100 loc) • 2.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mediaInline = void 0;
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
var _annotation = require("../marks/annotation");
var _border = require("../marks/border");
var _link = require("../marks/link");
var _unsupportedMark = require("../marks/unsupportedMark");
var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaInline').define({
selectable: true,
// atom: false,
inline: true,
marks: [_link.link, _annotation.annotation, _border.border, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
attrs: {
type: {
type: 'enum',
values: ['link', 'file', 'image'],
optional: true,
default: 'file'
},
url: {
type: 'string',
default: null,
optional: true
},
id: {
minLength: 1,
type: 'string',
default: ''
},
alt: {
type: 'string',
default: '',
optional: true
},
collection: {
type: 'string',
default: ''
},
occurrenceKey: {
minLength: 1,
type: 'string',
optional: true,
default: null
},
width: {
type: 'number',
default: null,
optional: true
},
height: {
type: 'number',
default: null,
optional: true
},
__fileName: {
type: 'string',
optional: true,
default: null
},
__fileSize: {
type: 'number',
optional: true,
default: null
},
__fileMimeType: {
type: 'string',
optional: true,
default: null
},
__displayType: {
type: 'enum',
values: ['file', 'thumbnail'],
optional: true,
default: null
},
__contextId: {
type: 'string',
optional: true,
default: null
},
__mediaTraceId: {
type: 'string',
optional: true,
default: null
},
__external: {
type: 'boolean',
optional: true,
default: false
},
data: {
type: 'object',
optional: true
}
}
});