UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

29 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var uuid_1 = require("../../plugins/tasks-and-decisions/uuid"); exports.decisionItem = { content: 'inline<_>*', attrs: { localId: { compute: uuid_1.default.generate }, state: { default: 'DECIDED' }, }, parseDOM: [{ tag: 'li[data-decision-local-id]', // Default priority is 50. We normaly don't change this but since this node type is // also used by list-item we need to make sure that we run this parser first. priority: 100, getAttrs: function (dom) { return ({ localId: uuid_1.default.generate(), state: dom.getAttribute('data-decision-state'), }); } }], toDOM: function (node) { var _a = node.attrs, localId = _a.localId, state = _a.state; var attrs = { 'data-decision-local-id': localId || 'local-decision', 'data-decision-state': state, }; return ['li', attrs, 0]; } }; //# sourceMappingURL=decision-item.js.map