This package provides rich text widgets and filters for Mezzanine to author content using Markdown syntax instead of the default TinyMCE editor.
Get and install the package:
pip install mezzanine-pagedown
Mezzanine 1.3 or higher is required.
Install the app in your Mezzanine project by adding mezzanine_pagedown to the list of INSTALLED_APPS in your project's settings.py.
Configure Mezzanine to use one of the provided rich text widgets. In your project's settings.py, set RICHTEXT_WIDGET_CLASS to:
Configure Mezzanine to use one of the provided rich text filters for rendering markdown content. In settings.py, set RICHTEXT_FILTERS to include one of the following:
Disable Mezzanine's HTML sanitizing so that it does not interfere with markdown's blockquote syntax (>):
RICHTEXT_FILTER_LEVEL = 3
mezzanine-pagedown provides its own sanitizing after rendering Markdown to HTML, and respects Mezzanine's RICHTEXT_ALLOWED_TAGS, RICHTEXT_ALLOWED_ATTRIBUTES, and RICHTEXT_ALLOWED_STYLES settings.
(Optional): Server-side previews:
In settings.py, enable server-side live previews in the editor:
PAGEDOWN_SERVER_SIDE_PREVIEW = True
By default (False), previews are generated client-side using PageDown's previewer.
In urls.py, enable the preview URL:
Then add the following line to urlpatterns:
In this case, the preview URL is /pagedown/preview/. You can replace "^pagedown/" with your own path.
(Optional): Set enabled extensions. Requires the custom filter:
RICHTEXT_FILTERS = ['mezzanine_pagedown.filters.custom'] PAGEDOWN_MARKDOWN_EXTENSIONS = ('extra','codehilite','toc')
To use a custom extension, import it and include an instance in the list of extensions:
from myapp.markdown_extensions.myextension import MyExtension PAGEDOWN_MARKDOWN_EXTENSIONS = ('extra', MyExtension())
(Optional): Generate and use a pygments CSS style for use with the CodeHilite extension (requires installing pygments):
python manage.py pygments_styles <scheme_name>
Licence: BSD. See included LICENSE file.
|File||Type||Python Version||Uploaded On||Downloads|
|mezzanine-pagedown-0.8.tar.gz||Source||Aug. 26, 2014||1,849|
|0.8||Aug. 26, 2014|
|0.7||July 9, 2014|
|0.6||Dec. 10, 2013|
|0.5||June 27, 2013|
|0.3||Feb. 13, 2013|
|0.2||Feb. 6, 2013|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.6||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.7||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.5||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.2||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.3||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||0.8||Release Created|
|June 17, 2015, 2:25 p.m.||mezzanine-pagedown||Package Created|