UNPKG

1.06 kBJavaScriptView Raw
1import { uuid } from '../../utils/uuid';
2var name = 'decisionList';
3export var decisionListSelector = "[data-node-type=\"" + name + "\"]";
4export var decisionList = {
5 group: 'block',
6 defining: true,
7 content: 'decisionItem+',
8 attrs: {
9 localId: { default: '' },
10 },
11 parseDOM: [
12 {
13 tag: "ol" + decisionListSelector,
14 // Default priority is 50. We normally don't change this but since this node type is
15 // also used by ordered-list we need to make sure that we run this parser first.
16 priority: 100,
17 getAttrs: function () { return ({
18 localId: uuid.generate(),
19 }); },
20 },
21 ],
22 toDOM: function (node) {
23 var localId = node.attrs.localId;
24 var attrs = {
25 'data-node-type': name,
26 'data-decision-list-local-id': localId || 'local-decision-list',
27 style: 'list-style: none; padding-left: 0',
28 };
29 return ['ol', attrs, 0];
30 },
31};
32//# sourceMappingURL=decision-list.js.map
\No newline at end of file