Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qbdesu/django-tui.editor
Django WYSIWYG markdown editor that supports GFM
https://github.com/qbdesu/django-tui.editor
django-application gfm markdown markdown-editor markdown-viewer
Last synced: 9 days ago
JSON representation
Django WYSIWYG markdown editor that supports GFM
- Host: GitHub
- URL: https://github.com/qbdesu/django-tui.editor
- Owner: QbDesu
- License: mit
- Created: 2021-04-27T14:05:29.000Z (over 3 years ago)
- Default Branch: potato
- Last Pushed: 2021-05-21T03:30:14.000Z (over 3 years ago)
- Last Synced: 2024-11-07T11:03:48.093Z (9 days ago)
- Topics: django-application, gfm, markdown, markdown-editor, markdown-viewer
- Language: JavaScript
- Homepage:
- Size: 376 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://ui.toast.com/tui-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](https://github.com/github/cmark-gfm/) are used while the editor falls back to a simple text area input.