django-codemirror-widget 0.3.0

Django's textarea like widget for using CodeMirror on textarea

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Alisue
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ Django Plugins
django-codemirror-widget is a Django app, a widget for using CodeMirror on Django's Textarea.

Install:

        sudo pip install django-codemirror-widget

or

        git clone git://github.com/alisue/django-codemirror-widget.git
        sudo pip install django-codemirror-widget/


or download repository and copy it to somewhere in PYTHON_PATH

How to Use:

1.      First, you need to specified `CODEMIRROR_PATH` on `settings.py`
        `CODEMIRROR_PATH` is the URI of CodeMirror directory like `CODEMIRROR_PATH = r"javascript/codemirror"`
2.      Use `codemirror.widgets.CodeMirrorTextarea` widgets for target Textarea like below

                from django import forms
                from codemirror.widgets import CodeMirrorTextarea

                codemirror = CodeMirrorTextarea(
                        parserfile=['parsexml.js'],
                        stylesheet=[r'javascript/codemirror/css/xmlcolor.css'],
                )
                document = forms.TextField(widget=codemirror)


Settings:


`CODEMIRROR_PATH`
:       the URI of CodeMirror directory

`CODEMIRROR_DEFAULT_PARSER`
:       the default parser (DEFAULT: 'parsedummy.js')

`CODEMIRROR_DEFAULT_STYLESHEET`
:       the default stylesheet (DEFAULT: '')

Last updated on June 13th, 2011

requirements

#Django textarea #CodeMirror widget #Django #CodeMirror #textarea #widget

Add your review!

SUBMIT