@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
29 lines • 906 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mention = {
inline: true,
group: 'inline',
attrs: {
id: { default: '' },
text: { default: '' },
accessLevel: { default: '' }
},
parseDOM: [{
tag: 'span[data-mention-id]',
getAttrs: function (dom) { return ({
id: dom.getAttribute('data-mention-id'),
text: dom.textContent,
accessLevel: dom.getAttribute('data-access-level')
}); }
}],
toDOM: function (node) {
var _a = node.attrs, id = _a.id, accessLevel = _a.accessLevel, text = _a.text;
var attrs = {
'data-mention-id': id,
'data-access-level': accessLevel,
'contenteditable': 'false',
};
return ['span', attrs, text];
}
};
//# sourceMappingURL=mention.js.map