UNPKG

586 BJavaScriptView Raw
1export var date = {
2 inline: true,
3 group: 'inline',
4 selectable: true,
5 attrs: {
6 timestamp: { default: '' },
7 },
8 parseDOM: [
9 {
10 tag: 'span[data-node-type="date"]',
11 getAttrs: function (dom) { return ({
12 timestamp: dom.getAttribute('data-timestamp'),
13 }); },
14 },
15 ],
16 toDOM: function (node) {
17 var attrs = {
18 'data-node-type': 'date',
19 'data-timestamp': node.attrs.timestamp,
20 };
21 return ['span', attrs];
22 },
23};
24//# sourceMappingURL=date.js.map
\No newline at end of file