w8tcha/CKEditor-CodeMirror-Plugin — pull request #16 by ChALkeR (2013-03-02 14:12:21+00:00)
Title: Add autoLoadCodeMirror config variable (defaults to true).

This allows disabling CodeMirror js/css autoloading in case if it's loaded manually.

For example, one could already have CodeMirror on his page, for syntax highlighting , non-wysiwyg editors mixed with wysiwig editors, or something like that.

Adding some kind of heuristic to detect already existing CodeMirror will do no good, because simple heuristic will fail sooner or later. The user might not understand why doesn't the plugin work out of the box if he loaded plain CodeMirror without some of the needed modes/plugins, but at the sime time why does it work when he didn't load CodeMirror at all. More complex heuristic just isn't KISS.

So, a manual «opt-out» configuration option is the best choice, in my opinion.