CKEditor-CodeMirror-Plugin
Syntax Highlighting for the CKEditor (Source View and Source Dialog) with the CodeMirror Plugin
Available Shortcuts
- 'Ctrl-K' to comment the currently selected text
- 'Ctrl-Shift-K' to uncomment currently selected text
- 'Ctrl-Alt-K' to auto format currently selected text
- 'Ctrl-Q' Expand/Collapse Code Block
- 'Ctrl-F' to perform a search
- 'Ctrl-G' to find next
- 'Ctrl-Shift-G' to find previous
- 'Ctrl-Shift-F' to find and replace
- 'Ctrl-Shift-R' to find and replace all
Demo
http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/
The Full Theme List can be found here: http://codemirror.net/demo/theme.html


License
Licensed under the terms of the MIT License.
Installation
- Extract the contents of the file into the "plugins" folder of CKEditor.
- In the CKEditor configuration file (config.js) add the following code:
config.extraPlugins = 'codemirror';
If you are using CKEditor in inline mode you also need to add the sourcedialog to the extra Plugins list
config.extraPlugins = 'sourcedialog,codemirror';
- To Configure the Plugin the following options are available...
config.codemirror = {
autoCloseBrackets: true,
autoCloseTags: true,
autoFormatOnStart: true,
autoFormatOnUncomment: true,
continueComments: true,
enableCodeFolding: true,
enableCodeFormatting: true,
enableSearchTools: true,
highlightMatches: true,
indentWithTabs: false,
lineNumbers: true,
lineWrapping: true,
mode: 'htmlmixed',
matchBrackets: true,
matchTags: true,
showAutoCompleteButton: true,
showCommentButton: true,
showFormatButton: true,
showSearchButton: true,
showTrailingSpace: true,
showUncommentButton: true,
styleActiveLine: true,
theme: 'default',
useBeautifyOnStart: false
};