Call CodeMirror plugin function from normal plugin

Is there a way to call function in CodeMirror plugin (like via normal plugin command?

I basically want to trigger CodeMirror command from right click menu entry registered by plugin.

I don't think it's possible yet, but I think this will need to be added at some point. Do you have a good idea for what you'd like this interface to look like?

Basically i don't.

Not sure how separate is ContentScript from Plugins but maybe something like postMessage / onMessage would be sufficient.
Also, this way of coding would be consistent with how messaging with Panels is implemented.