Features & Development

CodeMirror editor

CodeMirror editor

by Larry Riddle -
Number of replies: 3
A year ago Geoff Goehle wrote on Planet WeBWorK about CodeMirror and PG:

"In an upcoming update we will replace the textarea editor with a CodeMirror based one."

Any new information about this? Did it make it into the 2.13 update?
In reply to Larry Riddle

Re: CodeMirror editor

by Michael Gage -
Yep. It's in there. :-)
In reply to Michael Gage

Re: CodeMirror editor

by Larry Riddle -
Where? I have updated our WeBWorK server to 2.13, but editing a file in the File Manager brings up the same editor as in 2.12. Do I have to load or install something to use the CodeMirror editor? I didn't see any mention of this in the release notes at http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.13.

In reply to Larry Riddle

Re: CodeMirror editor

by Michael Gage -
The PGCodeMirror is automatically enabled in defaults.conf to work with the PG problem editor. The necessary javaScript files for enabling CodeMirror have not been added to the File Manager page.

# This sets if the PG editor should use a js based "codemirror" editor or
# just a textarea
$options{PGCodeMirror} = 1;
# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
$options{PGMathView} = 0;

It's also option in localOverrides.conf.dist which is also turned by default.
(But you will need to transfer new features in localOverrides.conf.dist to your localOverrides.conf by hand since your local .conf files are not changed during updates. )

You might have to use Shift-Reload on pages you are currently editing to force the browser to reload the javaScript that makes CodeMirror work.