Install

How to Use

First, you need to specified CODEMIRROR_PATH on settings.py.
CODEMIRROR_PATH is the URI of CodeMirror directory like CODEMIRROR_PATH = r"javascript/codemirror".
If you don't specify it, it defaults to 'codemirror'.
CodeMirror should be put there.

Use codemirror.CodeMirrorTextarea widget for target Textarea like below:

A format string interpolated with the form field name to name a global JS variable that will hold the CodeMirror
editor object. For example with CODEMIRROR_JS_VAR_FORMAT = "%s_editor" and a field named 'code', the JS variable
name would be 'code_editor'. If CODEMIRROR_JS_VAR_FORMAT is None, no global variable is created (DEFAULT: None)