A cross between ProseMirror and CodeMirror

I am looking for an HTML editor like ProseMirror that has “autocomplete” like CodeMirror. I want to be able to introduce replacement tokens into the code (that will later be parsed for mail merge like functionality) but the tokens need to come from a “data dictionary” of possible tokens. Is this possible with ProseMirror?

It does’t come built-in, but you can certainly build something like that on top of ProseMirror.

One possibility would be to to use inputrules to detect the keystrokes pattern you want to autocomplete, and then replace that with a non-editable mark that contains the necessary information so it can be identified for replacement (which I assume you want to do outside of ProseMirror, after serialization of the doc)