Skip to main content

Markdown editor and viewer widgets for Django

Project description

Django-TUI.Editor

Django WYSIWYG markdown editor that supports GFM

This is a django app that adds a markdown widget utilizing the TOAST UI Editor. Among other things it also adds a MarkdownField type that is an extension of the TextField but will use a WYSIWYG Markdown editor in the admin interface. The editor allows editing the markdown source code with a preview on the side.

How it works

The module adds 3 widgets based on django's own widget API:

  1. MarkdownEditorWidget: A WYSIWYG editor that also supports Markdown source code editing with syntax highlighting and a preview of the rendered implemented using the TOAST UI Editor
  2. MarkdownViewerWidget: A markdown viewer also implemented using the TOAST UI Editor which falls back to statically rendered markdown
  3. StaticMarkdownViewerWidget: A statically rendered markdown viewer that should work on all browsers without any javascript

On NoScript support

The rendering supports both a fancy viewer and editor in script-enabled environments but allows falling back to statically rendered elements if scripts are not supported or disabled. For static rendering of the viewer the python bindings for Github's GFM Markdown implementation cmark-gmf are used while the editor falls back to a simple text area input.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tuieditor-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

django_tuieditor-0.1.0-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page