我正在尝试使用自动增长插件的核心用户。由于我是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');
不知道还能做什么?有什么想法?建议?
发布于 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进行配置:
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']
],
}
}https://stackoverflow.com/questions/21078251
复制相似问题