UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

33 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var defaultAttrs = { text: { default: '' }, textUrl: { default: null }, link: { default: null }, background: { default: null }, collapsible: { default: null }, preview: { default: null }, title: { default: { text: '' } }, description: { default: null }, details: { default: null }, context: { default: null }, }; exports.applicationCard = { inline: false, selectable: true, attrs: defaultAttrs, parseDOM: [{ tag: 'div[data-node-type="media"]', getAttrs: function (dom) { var attrs = { text: '', title: { text: '' } }; Object.keys(defaultAttrs).forEach(function (key) { attrs[key] = dom.dataset[key]; }); return attrs; } }], toDOM: function (node) { return ['div', node.attrs]; } }; //# sourceMappingURL=applicationCard.js.map