首页 > 代码库 > Django - 安装Ckeditor
Django - 安装Ckeditor
1. Ckedior.js
CKEDITOR.editorConfig = function( config ) { // config.filebrowserUploadUrl="/blog/upload_img/"; config.extraPlugins = ‘codesnippet‘; };
这个是必须的。
2. settings.py
CKEDITOR_CONFIGS = { ‘default‘: { ‘extraPlugins‘: ‘sourcedialog,codemirror,widget,lineutils,codesnippet,selectall‘, ‘toolbar‘: ‘Full‘, }, ‘zinnia-content‘: { ‘toolbar_Zinnia‘: [ [‘Cut‘, ‘Copy‘, ‘Paste‘, ‘PasteText‘, ‘PasteFromWord‘], [‘Undo‘, ‘Redo‘], [‘Scayt‘], [‘Link‘, ‘Unlink‘, ‘Anchor‘], [‘CodeSnippet‘, ‘Image‘, ‘Table‘, ‘HorizontalRule‘, ‘SpecialChar‘], [‘Source‘], [‘Maximize‘], ‘/‘, [‘Bold‘, ‘Italic‘, ‘Underline‘, ‘Strike‘, ‘Subscript‘, ‘Superscript‘, ‘-‘, ‘RemoveFormat‘], [‘NumberedList‘, ‘BulletedList‘, ‘-‘, ‘Outdent‘, ‘Indent‘, ‘-‘, ‘Blockquote‘], [‘Styles‘, ‘Format‘], ], ‘toolbar‘: ‘Zinnia‘, },}
Done
Django - 安装Ckeditor
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。