UNPKG

@atlaskit/adf-schema

Version:

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

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