Fabian Büchler avatar Fabian Büchler committed d3adac5

Added quickstart documentation.

Comments (0)

Files changed (6)

 **Code and issues**
     on bitbucket: https://bitbucket.org/fabianbuechler/django-markupmirror
 
-    https://bitbucket.org/fabianbuechler/django-markupmirror/issues
-
 **Releases**
     on PyPi: http://pypi.python.org/pypi/django-markupmirror
 
 **Code and issues**
     on bitbucket: https://bitbucket.org/fabianbuechler/django-markupmirror
 
-    https://bitbucket.org/fabianbuechler/django-markupmirror/issues
-
 **Releases**
     on PyPi: http://pypi.python.org/pypi/django-markupmirror
 
 .. _django-markupfield: https://github.com/jamesturk/django-markupfield
 .. _FeinCMS: http://www.feinheit.ch/media/labs/feincms/
 
-Quickstart
-==========
-
-
+.. include:: quickstart.rst
 
 Contents
 ========

docs/quickstart.rst

+Quickstart
+==========
+
+* To **install** django-markupmirror, use `pip`_ (or `easy_install`_ or simply
+  ``python setup.py install`` from source) and add ``'markupmirror'`` to the
+  ``INSTALLED_APPS`` in your `Django`_ project.
+
+* If you want the `FeinCMS`_ content-type model ``MarkupMirrorContent``, you'll
+  also need to add ``'markupmirror.feincms'`` to your ``INSTALLED_APPS``.
+
+  Also, you need to register the content-type model with FeinCMS' Page module::
+
+    from feincms.module.page.models import Page
+    from markupmirror.feincms.models import MarkupMirrorContent
+
+    Page.create_content_type(MarkupMirrorContent)
+
+* In your ``settings.py`` specify at least ``MARKUPMIRROR_DEFAULT_MARKUP_TYPE``
+  which is ``'plaintext'`` by default.
+
+* Add one or more ``markupmirror.fields.MarkupMirrorField`` s to your models
+  and define ``markup_type`` or ``default_markup_type``::
+
+    class ModelWithMarkup(models.Model):
+        content = MarkupMirrorField(
+            verbose_name="content", markup_type='markdown')
+
+By default, django-markupmirror comes with markup converters for plain text
+(converts links and linebreaks), HTML (does nothing), `Markdown`_,
+`reStructuredText`_ and `Textile`_. However, you can register your own markup
+converters.
+
+.. _pip: http://www.pip-installer.org/
+.. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall
+.. _Django: http://www.djangoproject.com/
+.. _FeinCMS: http://www.feinheit.ch/media/labs/feincms/
+.. _Markdown: http://daringfireball.net/projects/markdown/
+.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _Textile: http://www.textism.com/tools/textile/

markupmirror/markup/plaintext.py

     elements respectively.
 
     """
-    codemirror_mode = ''
+    codemirror_mode = 'text/plain'
     title = _(u"Plain text")
 
     def convert(self, markup):

markupmirror/markup/textile_.py

     """Markup transformer for Textile content.
 
     """
-    codemirror_mode = ''
+    codemirror_mode = 'text/plain'
     title = _(u"Textile")
 
     def __init__(self):
     description="Django field and widget for editing markup content.",
     long_description='\n\n'.join([
         read('README.rst'),
+        read('docs', 'quickstart.rst'),
         read('docs', 'installation.rst'),
         read('docs', 'usage.rst'),
         read('docs', 'changelog.rst'),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.