UNPKG

@atlaskit/adf-schema

Version:

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

24 lines 558 B
export const unsupportedBlock = { inline: false, group: 'block', atom: true, selectable: true, attrs: { originalValue: { default: {} } }, parseDOM: [{ tag: '[data-node-type="unsupportedBlock"]', getAttrs: dom => ({ originalValue: JSON.parse(dom.getAttribute('data-original-value') || '{}') }) }], toDOM(node) { const attrs = { 'data-node-type': 'unsupportedBlock', 'data-original-value': JSON.stringify(node.attrs.originalValue) }; return ['div', attrs, 'Unsupported content']; } };