UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

26 lines 905 B
import uuid from '../../plugins/tasks-and-decisions/uuid'; export var taskList = { group: 'block', content: 'taskItem+', attrs: { localId: { compute: uuid.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.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