I like to integrate codemirror as shown in https://prosemirror.net/examples/codemirror. Is there some way to specify language-xxx class in its code tag? as I will use prismjs/highlightjs to highlight grammar when displaying editted html content.
Basically, you’ll want to extend your schema to associate a language with code blocks as a node attribute (and give users some way to control it), and then set up the node’s toDOM
method to emit the appropriate language-
class (and the node view integration to sync the CodeMirror mode with this attribute).