管理员中的 Django-tinymce 功能齐全
Django-tinymce full featured in admin
我将 django-tinymce 设置为与管理员一起工作,就像描述的文档一样
在设置中
INSTALLED_APPS = [ ..., 'tinymce',]
在我添加的模型中
from tinymce.models import HTMLField
content = HTMLField()
在网址中
urlpatterns = [ ...., url(r'^tinymce/', include('tinymce.urls')),]
但我不知道如何添加图标和插件!
我做了很多研究,但找不到任何有用的东西。
我需要 Full Featured 编辑器。
您缺少一些配置设置 .py
TINYMCE_JS_URL = 'http://debug.example.org/tiny_mce/tiny_mce_src.js'
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
'cleanup_on_startup': True,
'custom_undo_redo_levels': 10,
}
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True
这是文档中给出的示例...试试看
http://django-tinymce.readthedocs.io/en/latest/installation.html
TINYMCE 很棒。但有时,它无法将输入发送回服务器。
TINYMCE 的替代品之一是 django-summernote,它易于设置和使用。
在此处查看 django-summernote:
https://github.com/summernote/django-summernote
我将 django-tinymce 设置为与管理员一起工作,就像描述的文档一样
在设置中
INSTALLED_APPS = [ ..., 'tinymce',]
在我添加的模型中
from tinymce.models import HTMLField
content = HTMLField()
在网址中
urlpatterns = [ ...., url(r'^tinymce/', include('tinymce.urls')),]
但我不知道如何添加图标和插件! 我做了很多研究,但找不到任何有用的东西。
我需要 Full Featured 编辑器。
您缺少一些配置设置 .py
TINYMCE_JS_URL = 'http://debug.example.org/tiny_mce/tiny_mce_src.js'
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
'cleanup_on_startup': True,
'custom_undo_redo_levels': 10,
}
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True
这是文档中给出的示例...试试看 http://django-tinymce.readthedocs.io/en/latest/installation.html
TINYMCE 很棒。但有时,它无法将输入发送回服务器。
TINYMCE 的替代品之一是 django-summernote,它易于设置和使用。
在此处查看 django-summernote: https://github.com/summernote/django-summernote