aj-may / django-bootstrap-markdown

An extension of the Django Textarea widget made for editing Markdown with a live preview.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django Bootstrap Markdown Editor

A beautiful Markdown editor with a side by side preview

Build Status Coverage Status Code Climate License Version PyPI Downloads GitTip

An extension of the Django Textarea widget made for editing Markdown with a live preview.

Example

Install:

> pip install django-bootstrap-markdown

Usage:

  • Add django-bootstrap-markdown to the installed apps of your Django Project
  • Instead of using the django Textarea widget use the MarkdownInput
  • Be sure to include the form's required media in the template. ie. {{ form.media }}
  • Also be sure to include Twitter Bootstrap
  • Include the markdown urls:

urls.py

urlpatterns = patterns('',
    ...
    url(r'^markdown/', include('django_bootstrap_markdown.urls')),
    ...
)

Example:

forms.py

from django import forms
from django_bootstrap_markdown.widgets import MarkdownInput

class PostForm(forms.Form):
	title = forms.CharField()
	markdown = forms.CharField( widget=MarkdownInput )

About

An extension of the Django Textarea widget made for editing Markdown with a live preview.

License:MIT License


Languages

Language:Python 81.1%Language:JavaScript 12.0%Language:CSS 4.4%Language:Shell 2.5%