Accessing Joplin model from CodeMirror plugin

It would also help with this feature: