django-codemirror-widget is Django form widget library for using CodeMirror on textarea
Project description
Django form widget library for using CodeMirror on Textarea
Install
sudo pip install django-codemirror-widget
or
sudo pip install git+git://github.com/lambdalisue/django-codemirror-widget.git#egg=django-code-mirror
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"
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: ‘’)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-codemirror-widget-0.1rc3.tar.gz
.
File metadata
- Download URL: django-codemirror-widget-0.1rc3.tar.gz
- Upload date:
- Size: 362.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f90ea600f495365bc912d7c9039df382bf0ceabebde4e063c61cf12654f65de |
|
MD5 | 0b9177e7d80f22e9bd49c1940b9cfaea |
|
BLAKE2b-256 | 1b4a524ffd9f893249c849270200bfed6446c99be53a3811507f0e00b852d304 |
File details
Details for the file django_codemirror_widget-0.1rc3-py2.7.egg
.
File metadata
- Download URL: django_codemirror_widget-0.1rc3-py2.7.egg
- Upload date:
- Size: 406.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654ec974cdcde6a33b1fd59ac9c1d62aa856fb25f866d95af6d2f28ebd8fe748 |
|
MD5 | bca947e67fa2090ea795afbdd279f5e4 |
|
BLAKE2b-256 | 0bf6bc778ac8a5caba9f7595d166ca42259575c8394e26f5be08f921fdea8dcc |