It seems that the application/x-spike language you're trying to use doesn't
exist in the regular Codemirror distribution and your custom language mode isn't
properly registered to be handled as expected.

In order to know which script file to use for source code rendering, the recipe needs
to analyze all the language mode provided by the CodeMirror distribution. This is made
by parsing both the mode/meta.js file to enumerate all the mode specifications, and
for each mode found, parse the single line define([ ... ]); specification in the
mode javascript file itself.

So, you should first, try to edit the mode/meta.js of your CodeMirror distribution and
register here your language mode, then make sure that the define([ ... ]);
specification in the mode file is written on a single line, and finally regenerate the
cm-modes-dependencies.php file to have it taken in account.

Sorry, I probably wasn't quite clear. I've already modified mode/meta.js as you suggested, but that doesn't matter in this case. The bug shows up with standard modes, too. There's something wrong either with my PmWiki configuration or with your plugin. Here is the minimal example:

Thank you for pointing me in the right direction. Enabling UTF-8 support was actually not enough. It probably would work for newly created pages, but already existing pages are encoded in ISO-8859-1. I ended up patching cm-sourceblock.php like this

Well done :) The recipe has been fixed accordingly and the continuelist is now able to catch the leading spaces when repeating the list item, but I don't see any simple mean to know when I should skip from a list item line to a whitespace prefixed line. BTW, I'll look into providing some kind of autoindentation but can't give any date for that.

Using Codemirror-5.34.0, I have tried adding each of the following options respectively in /local/config.php before the include_once line to load CodeMirror. In each case CodeMirror does work, but vim mode is not enabled though.

$CodeMirrorActivePreset['keyMap'] = 'vim';

$CodeMirrorPresets['keyMap'] = "vim";

$CodeMirrorPresetParams['keyMap'] = 'vim';

$CodeMirrorConfig['keyMap'] = "vim";

Any help will be appreciated, thanks.
casperl February 05, 2018, at 03:56 AM

Thanks for the comment. In fact, I didn't enable any editor's custom keymap (and related scripts) in the previous recipe version. This has been fixed for now and you could enable it with:

Recipes like EditPosFix or RememberEditPosition do not work after installing this receipe. Some function of that kind would be great, allthough. Is there anyone, who can implement this? svasta, 2016-11-30

I've had a coworker complain about losing spell checking when this awesome editor is installed. I've attempted to shoe horn in a couple of the suggested fixes (html span assignment or outside javascript) from CM's github discussions but haven't had any luck. Any advice ?