UNPKG

944 BJavaScriptView Raw
1var name = 'confluenceUnsupportedBlock';
2export var confluenceUnsupportedBlock = {
3 group: 'block',
4 attrs: { cxhtml: { default: null } },
5 toDOM: function (node) {
6 // NOTE: This node cannot be "contenteditable: false". If it's the only node in a document, PM throws an error because there's nowhere to put the cursor.
7 var attrs = {
8 'data-node-type': name,
9 'data-confluence-unsupported': 'block',
10 'data-confluence-unsupported-block-cxhtml': node.attrs['cxhtml'],
11 };
12 return ['div', attrs, 'Unsupported content'];
13 },
14 parseDOM: [
15 {
16 tag: "div[data-node-type=\"" + name + "\"]",
17 getAttrs: function (dom) {
18 return {
19 cxhtml: dom.getAttribute('data-confluence-unsupported-block-cxhtml'),
20 };
21 },
22 },
23 ],
24};
25//# sourceMappingURL=confluence-unsupported-block.js.map
\No newline at end of file