首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用djangocms配置自动增长插件.文本-ckeditor

用djangocms配置自动增长插件.文本-ckeditor
EN

Stack Overflow用户
提问于 2014-01-12 17:59:49
回答 1查看 1.1K关注 0票数 1

我正在尝试使用自动增长插件的核心用户。由于我是django和ckeditor的新手,所以我在配置上遇到了问题。我的设置没有被识别。下面是步骤列表。我曾见过关于必须重新构建ckeditor的说法。我不知道是否需要这样做。

平台: Ubuntu,django-cms 3 beta,djangocms-text-ckeditor (在virtualenv中安装了pip ),python 2.7。

我不知道我到底需要做什么,但我还是改变了以下几点。

S1。在项目的settings.py中添加了

CKEDITOR_SETTINGS =getattr(设置,'CKEDITOR_SETTINGS',{ 'config.autoGrow_onStartup':True,‘config.autoGrow_minHL.8’:200,‘config.autoGrow_maxHL.8’:400,})

S2。在../site-packages/django_text_ckeditor/static/ckeditor/config.js,编辑中

CKEDITOR.editorConfig = function( config ){ //在这里定义对默认配置的更改。例如: // config.language = 'fr';// config.uiColor = '#AADC6E';config.autoGrow_onStartup =真;config.autoGrow_minHeight = 2000;config.autoGrow_maxHeight = 4000;};

S3。将自动增长插件文件夹添加到

"../site-packages/django_text_ckeditor/static/ckeditor/plugins/autogrow“

S4。修改后的第45行

"../site-packages/django_text_ckeditor/static/js/cms.ckeditor.js“ “插件外”:“cmsplugins,autogrow”

S5。的第58行之后添加了一条额外的语句。

"../site-packages/django_text_ckeditor/static/js/cms.ckeditor.js“ //这是第58行CKEDITOR.plugins.addExternal('cmsplugins',settings.static_url + 'ckeditor_plugins/cmsplugins/');//这是添加的行CKEDITOR.plugins.addExternal('autogrow',settings.static_url + 'ckeditor/plugins/autogrow');

不知道还能做什么?有什么想法?建议?

EN

回答 1

Stack Overflow用户

发布于 2015-06-04 10:57:00

我正在使用这里的标准django-ckeditor:https://github.com/django-ckeditor/django-ckeditor

不需要您的步骤S2、S4和S5。修改密码子的来源是没有意义的。只需从http://ckeditor.com/addon/autogrow下载autogrow插件并使用settings.py进行配置:

代码语言:javascript
复制
CKEDITOR_CONFIGS = {
    'default': {
        'autoGrow_onStartup': True,
        'autoGrow_minHeight': 100,
        'autoGrow_maxHeight': 650,
        'extraPlugins': 'autogrow',
            'toolbar': 'Custom',
            'toolbar_Custom': [
            ['Bold', 'Italic', 'Underline'],
            ['Format'],
            #['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
            ['Link', 'Unlink'],
            ['RemoveFormat', 'Source']
        ],
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21078251

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档