@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
31 lines • 928 B
JavaScript
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 },
};
export var 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