Django Markdown编辑器为Dracos Linux构建https://dracos-linux.org

draceditor的Python项目详细描述


Draceditor PYPI版本| pypi版本
图像::https://img.shields.io/pypi/v/draceditor.svg?style=flat square
:目标:https://pypi.python.org/pypi/draceditor

…图片::https://img.shields.io/badge/license-gnugplv3-blue.svg?style=flat square
:目标:https://raw.githubusercontent.com/agusmakmun/draceditor/master/license

…图片::https://img.shields.io/pypi/pyversions/draceditor.svg?style=flat square
:目标:https://pypi.python.org/pypi/draceditor

…图片::https://img.shields.io/badge/django-1.8、%201.9、%201.10-green.svg?style=flat square
:目标:https://www.djangoproject.com

…图片::https://img.shields.io/pypi/dm/draceditor.svg?style=flat square
:目标:https://pypi.python.org/pypi/draceditor


**draceditor**是为dracos linux*构建的django标记编辑器(https://dracos linux.org)*.
演示视频:https://youtu.be/dzczd7y8p0y



集成了"ace editor"
*与"semantic ui"集成
*实时预览
*将图像上传到imgur.com`(通过api)`
*emoji``:emoji`+备忘单
*直接提及用户``@[用户名]`-`(要求用户登录)`
*突出显示"pre`
*django管理员支持
*工具栏按钮图片::https://raw.githubusercontent.com/agusmakmun/dracos markdown editor/master/\u截图/draceditor preview.png




Requirements
--------

*``django>;=1.10.1``
*``markdown>;=2.6.7``
*``requests>;=2.12.4`





--------


draceditor可直接从"pypi"获得:

1。安装程序包。

:::


$pip安装draceditor



2。别忘了将"draceditor"添加到"已安装的应用程序"的"设置"(无迁移)中。




settings.py
已安装的应用程序=[

"draceditor",
]




3。向"urls.py.`

::


urls.py
urlpatterns=[

url(r'^draceditor/',include('draceditor.urls'),
]




4添加url模式。collect包含一些draceditor静态文件到"static_root"文件夹中。

::


./manage.py collectstatic




settings``settings.py`
--------------------------

请在https://api.imgur.com/oauth2/addc中注册应用程序客户端获取"imgur客户端ID"和"imgur API密钥"。

DITOR_enable嫒u configs'={
'imgur':'true',嫒启用/禁用imgur/自定义上载程序。
'提到':'false',嫒启用/禁用提到
'jquery':'true',嫒包括/撤消jquery(需要管理员默认django)
}

r/>draceditor_imgur_client_id='您的客户端id'
draceditor_imgur_api_key='您的api key'


draceditor_markdownify_url='/draceditor/markdownify/'默认值

\markdown扩展(默认值)
draceditor_markdown扩展=[
'markdown.extensions.extra',
'markdown.extensions.nl2br',
'markdown.extensions.smarty',
'标记down.extensions.fenced"代码",自定义标记扩展。rlize'、
"draceditor.extensions.del嫒ins"、
删除线~~和++下划线++
"draceditor.extensions.notify"、
"require for notify
"draceditor.extensions.emoji"、
"require for emoji
"
"markdown extensions configures
"draceditor.ma"Rkdown扩展名配置为{}

markdown url
draceditor_upload_url='/draceditor/uploader/''default
draceditor_search_users_url='/draceditor/search user/''default

markdown扩展名
draceditor_markdown_base_emoji url='https://assets cdn.github.com/images/icons/emoji/'default
draceditor\u markdown\u base\u提URL='https://forum.dracos-linux.org/profile/''default(更改此项)


用法
-

**模型**



django.db导入模型
tor.models导入draceditorfield

class post(models.model):
description=draceditorfield()



**表单**





从django导入表单
从draceditor.fields导入draceditorformfield

class post form(forms.form):
description=draceditorformfield()



**管理员**

::


从django.db导入模型
从django.contrib导入管理员


从draceditor.widgets导入管理员widget

从应用程序导入模型eladmin(admin.modeladmin):
formfield_overrides={
models.textfield:{'widget':admindraceditorwidget},
}


admin.site.register(yourmodel,yourmodeladmin)


**模板**

从``draceditor/templatetatags/dractags.py```````dractags.py``````dractags.py``````dractags.py`.




<







{{field{field{安全{安全{安全{安全{安全{安全{安全{安全{安全}}



>如果您想保存来自```dractags.pr





是的上传到存储器中的图像,
**draceditor**也可用于处理。请签出此"wiki"。

dracos markdown editor/&;python setup.py install
$cd draceditor\u demo/
$python manage.py makemigrations&;python manage.py migrate
$python manage.py runserver



draceditor命令引用图片::https://raw.githubusercontent.com/agusmakmun/dracos markdown editor/master/\u屏幕截图/draceditor guide.png




notes
---------------------------

**draceditor**的灵感来自伟大的"django markdownx"、"python markdown"和"online structuredtext editor"。



…_ ace编辑器:https://ace.c9.io
…_语义用户界面:http://semantic ui.com
…_ pypi:https://pypi.python.org/pypi/draceditor
。_ django-markdownx:https://github.com/adi-/django-markdownx
。_ python标记:https://github.com/waylan/python markdown
。_在线重构文本编辑器:http://rst.ninjs.org
…_ wiki:https://github.com/agusmakmun/dracos降价编辑器/wiki

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
添加组件后,java JTable为空   java将json发送到php并插入mysql,但返回null   java Spring引导JNDI CommonJ资源   从不同PC创建和合并后的Java servlet问题   java如何在使用findelements时从xpath获取文本   java使用spring boot使用gmail smtp发送电子邮件   java在不使用pojo、bean或getter和setter的情况下获取Json标题的Json数组   Java中的OpenFile对话框将null作为响应   JavaBuilder模式。扩展接口   java中无需替换的数据结构选取   java如何评价Encog中的预测神经网络   java如何在安卓中使用实际的HttpURLConnection进行单元测试?   java使用XML配置禁用WebSocket中的CSRF保护   java如何通过hibernate从多表查询中获取数据?   mysql如何在java中获取更新的行Id   java AEM/CQ组件单一组件/有限组件   java FFmpeg Javacv延迟问题   显示整数数组的java不起作用