How can we Remove AutoJoin for a Node?

Hello all!!

What is the best way to remove the AutoJoin functionality for a given Node? We have found it to be an unexpected behaviour for two instances of a Node that we don’t want to join even when side-by-side in the document.

https://prosemirror.net/docs/ref/#commands.autoJoin

That command-wrapper will only take effect if you explicitly use it in your keymap, so there is nothing you have to do to remove it (except not using it).

I think my question came across a little unclear. I’m under the impression that automatic list-joining is a default in ProseMirror, as I didn’t have to additionally configure the editor to get that behaviour.

This is what I get on the initial render for this content.

const content = `
    <multipleChoiceQuestion>
        <multipleChoiceOption>Apples</multipleChoiceOption>
        <multipleChoiceOption>Oranges</multipleChoiceOption>
        <multipleChoiceOption>Bananas</multipleChoiceOption>
    </multipleChoiceQuestion>
    <multipleChoiceQuestion>
        <multipleChoiceOption>Apples</multipleChoiceOption>
        <multipleChoiceOption>Oranges</multipleChoiceOption>
        <multipleChoiceOption>Bananas</multipleChoiceOption>
    </multipleChoiceQuestion>
`

image

And I am expecting it to look like this:

It is not the default, and it definitely doesn’t happen during parsing.

Ok, I’ll come up with a minimal sandbox to reproduce this behaviour. I’m still unclear why this is happening.