# django-markdown-editor **Repository Path**: shouyong/django-markdown-editor ## Basic Information - **Project Name**: django-markdown-editor - **Description**: 版权归:https://github.com/feiyin0719/django-markdown-editor.git和https://blog.csdn.net/a582816317/article/details/79007164 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-07-06 - **Last Updated**: 2022-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Django markdown-editor ------------ The markdown editor widget for Django,you can use it in admin fields and forms,it is based on editor.md js plugins.  ## how to use 1.git clone https://github.com/feiyin0719/django-markdown-editor.git 2.copy markdown folder to your project 3.add markdown in your project settings.py, such as ```python INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'markdown', ) ``` 4.use in admin.py ```python class TestAdmin(admin.ModelAdmin): formfield_overrides = { models.TextField: {'widget': AdminMarkdownWidget()}, } admin.site.register(Test,TestAdmin) ``` if you use xadmin,please use XAdminMarkdownWidget,such as: ```python class TestAdmin(admin.ModelAdmin): formfield_overrides = { models.TextField: {'widget': XAdminMarkdownWidget()}, } xadmin.site.register(Test,TestAdmin) ``` 5.use in forms ```python from django import forms from markdown.forms import MarkdownField class BlogForm(forms.Form): name = forms.CharField() url = forms.URLField() context = MarkdownField() ``` then in in templates,please add {{form.media}} in
to import js/css ```html