Access MarkdownFileView's codemirror mode

I’m trying to create a plugin for an org-like file format, and have managed to make a code mirror mode for it, but creating a CodeMirror editor on my own and using it seems to create a very broken editor. I want to be able to use the default markdown editor, but with different rules for what is bold, italic, header etc.