UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

36 lines (34 loc) 629 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.date = void 0; /** * @name date_node */ var date = { inline: true, group: 'inline', selectable: true, attrs: { timestamp: { default: '' } }, parseDOM: [{ tag: 'span[data-node-type="date"]', getAttrs: function getAttrs(dom) { return { timestamp: dom.getAttribute('data-timestamp') }; } }], toDOM: function toDOM(node) { var attrs = { 'data-node-type': 'date', 'data-timestamp': node.attrs.timestamp }; return ['span', attrs]; } }; exports.date = date;