Well, I'm still examining the CodeMirror code to see what it does...
The codemirror.class.php file makes reference to a connector.php file in line 22, but there is no such connector.
$connectorUrl = $assetsUrl.'connector.php';
I also noticed that in codemirror.plugin.php lines 2 and 21 are duplicates
'OnFileEditFormPrerender',
'OnFileEditFormPrerender',
More to the point, however, I see things like this
case 'OnDocFormPrerender':
$options['modx_loader'] = 'onResource';
$options['mode'] = 'htmlmixed';
$load = true;
break;
Then if $load is true, it loads up the javascript and css files with ordinary regClientWhatver() functions.
So I'm thinking perhaps I can just copy all of the CodeMirror files and settings, then hijack them to read markitup instead of codemirror. Worth a try, anyway...
A few weirdnesses in the tinymce package, too...
<?php
/**
* TinyMCE Connector
*
* @package quip
*/
And in the tinymceclass.php file...
/* will need to do $this->modx->controller->addHtml() for Revo 2.2+ */
$this->modx->regClientStartupHTMLBlock($script);
return '';
Except that codemirror doesn't have a controller file, but it does have an entry in the Actions list. Hm. I'm beginning to see a vague outline of the picture here, I think.