Skip to content
CodeMagic is an advanced source code editor plugin for Tinymce. It integrates the CodeMirror library for syntax coloring, and the JSBeautifier library for code formating and indentation.
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 16 commits behind tinymce-plugins:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
css
img
js
langs
.gitmodules
README.md
codemagic.htm
editor_plugin.js
editor_plugin_src.js
licence.txt

README.md

CodeMagic

CodeMagic is a replacement source code editor plugin for Tinymce which integrates the [CodeMirror] (http://www.codemirror.net/) library for syntax highlighting.

Usage

  1. Drop the plugin folder in to your tinymce plugin directory
  2. In the plugins section of your tinyMCE.init add codemagic
  3. 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

  1. Uses latest version of CodeMirror which is included as a complete package and not within the CodeMirror js itself
  2. Relies on CodeMirror to perform the search/replace and screen wrap functionality
  3. Uses CodeMirror's themes and, if you have local storage capabilities in your browser, will remember your choice
  4. Currently doesn't use JS Beautifier
  5. Various other bits and bobs
You can’t perform that action at this time.