I've been trying to integrate CodeMirror code editor into Wygwam's source view without much success. I have tried using the "wygwam_config" hook as well as adding a config.js file to Wygwam's advanced settings configuration screen which is supposed to enable the code mirror plugin.

Basically I would like this plugin to override the native source view: http://ckeditor.com/addon/codemirror

Is this possible?


That plugin looks like it's for CKEditor 4. Wygwam uses CKEditor 3. I'm not sure if plugins from one version work with the other.

| improve this answer | |
  • Thanks Rob, that might be it. Is there another plugin you know of that might do this? – Nuno Albuquerque May 30 '13 at 19:44
  • Maybe this one? rondvorak.com/browse/browse/ckeditor-codemirror – Rob Sanchez May 31 '13 at 14:48
  • Oh dude, you rule. Clearly my Googlefoo is not very good, I looked high and dry for this very thing. I will give this a shot, it should do the trick! Thank you! – Nuno Albuquerque May 31 '13 at 18:51
  • FYI - Did get this sort of working with some mods to the plugin.js provided on this page and using version 1.0 of CodeMirror found here: codemirror.net/codemirror-1.0.zip There is an issue with the size of the source view in that its much shorter than the editor window, and doesn't resize when you resize the editor or go full screen. I'm gonna put this on the shelf for now. In the future I might just opt to use Wyvern which uses CKEditor4 which would allow me to use the latest version of the CodeMirror plugin. – Nuno Albuquerque Jun 1 '13 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.