CodeMagic is a replacement source code editor plugin for Tinymce which integrates the [CodeMirror] (http://www.codemirror.net/) library for syntax highlighting.
- Drop the plugin folder in to your tinymce plugin directory
- In the plugins section of your tinyMCE.init add codemagic
- In your buttons configuration (eg, theme_advanced_buttons3) add codemagic (you would usually replace the code entry)
By default the key used for localStorage is 'tinymce:codemagic' and every instance of TinyMCE you use with the CodeMagic plugin will retain the same theme (if your browser supports localStorage). If you'd like to have different themes saved for different instances, then in your tinyMCE.init you should add:
codemagic_storage_key : 'your_key_name_here'
Changes in this fork from original CodeMagic plugin
- Uses latest version of CodeMirror which is included as a complete package and not within the CodeMirror js itself
- Relies on CodeMirror to perform the search/replace and screen wrap functionality
- Uses CodeMirror's themes and, if you have local storage capabilities in your browser, will remember your choice
- Currently doesn't use JS Beautifier
- Various other bits and bobs