nodeSpec.marks not work at inline node

Hello. I define a inline node ,the schema as below.

 {
        group: 'inline',
        inline: true,
        atom: true,
        marks: '', // set empty to disable all marks, but it seem not work.
        attrs: {
          index: {}, 
        },
        parseDOM: [
            {
                tag: 'sup', getAttrs(dom) {
                    return {
                        index: dom.getAttribute('data-index'),
                    }
                }
            }
        ],
        toDOM(node) {
            let { index } = node.attrs;
            return [
                'sup',
                {
                    'data-index': index,
                }
            ];
        }
    }

it seem the empty marks not work, it not disable all marks.(After set it to empty, I also can set marks in the node). What can I do for fix the bug?

It not disable all marks… strong and em work.

thx for u help.

1 Like

Marks can’t be configured per node, only per parent node. I.e. you can disable marks in code blocks, but you can’t disable them only for a specific type of inline element.

1 Like

Thank you. Is there any other resolution to disable marks in special inline node ?

No, that’s not supported.

1 Like