UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

28 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var uuid_1 = require("../../plugins/tasks-and-decisions/uuid"); exports.taskList = { group: 'block', content: 'taskItem+', attrs: { localId: { compute: uuid_1.default.generate }, }, parseDOM: [{ tag: 'ol[data-task-list-local-id]', // Default priority is 50. We normaly don't change this but since this node type is // also used by ordered-list we need to make sure that we run this parser first. priority: 100, getAttrs: function (dom) { return ({ localId: uuid_1.default.generate(), }); } }], toDOM: function (node) { var localId = node.attrs.localId; var attrs = { 'data-task-list-local-id': localId || 'local-task-list', 'style': 'list-style: none; padding-left: 0' }; return ['ol', attrs, 0]; } }; //# sourceMappingURL=task-list.js.map