Hello! This issue is related to this already reported issue which was fixed. The problem is that pressing enter in a code block will delete any subsequent lines in that block. It happens on iOS Safari reliably, not sure about other mobile browsers. This is the schema of the code block:
code_block: {
content: "text*",
marks: "",
group: "block",
code: true,
defining: true,
draggable: false,
parseDOM: [{ tag: "pre", preserveWhitespace: "full" }],
toDOM: () => ["pre", { spellcheck: "false" }, ["code", 0]],
}
This case doesn’t get picked up by the previous fix (code here) because the nodes added are code
and text
, neither of which meet the condition (code is an inline node).
Can anyone suggest a workaround or solution?