|
|
@@ -12,6 +12,7 @@ CKEDITOR.editorConfig = function( config )
|
|
|
|
|
|
/* Filebrowser routes */
|
|
|
// The location of an external file browser, that should be launched when "Browse Server" button is pressed.
|
|
|
+ //文件上传POST请求的URL
|
|
|
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
|
|
|
|
|
|
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
|
|
|
@@ -34,6 +35,17 @@ CKEDITOR.editorConfig = function( config )
|
|
|
|
|
|
config.allowedContent = true;
|
|
|
|
|
|
+ //上传图片去掉预览文字
|
|
|
+ config.image_previewText =' ';
|
|
|
+ //config.maxSize = 0;
|
|
|
+ // 字体
|
|
|
+ config.font_names= '宋体/SimSun;新宋体/NSimSun;仿宋_GB2312/FangSong_GB2312;楷体_GB2312/KaiTi_GB2312;黑体/SimHei;微软雅黑/Microsoft YaHei;' + config.font_names;
|
|
|
+
|
|
|
+ //增加行距插件
|
|
|
+ config.extraPlugins += (config.extraPlugins ? ',lineheight' : 'lineheight');
|
|
|
+ //从word复制时保留格式
|
|
|
+ config.pasteFromWordRemoveFontStyles = false;
|
|
|
+ config.pasteFromWordRemoveStyles = false;
|
|
|
// Rails CSRF token
|
|
|
config.filebrowserParams = function(){
|
|
|
var csrf_token, csrf_param, meta,
|
|
|
@@ -93,6 +105,8 @@ CKEDITOR.editorConfig = function( config )
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // 设置初始高度
|
|
|
+ config.height = 600;
|
|
|
// Toolbar groups configuration.
|
|
|
config.toolbar = [
|
|
|
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source'] },
|
|
|
@@ -100,12 +114,13 @@ CKEDITOR.editorConfig = function( config )
|
|
|
// { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
|
|
|
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
|
|
|
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
|
|
|
- { name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
|
|
+ { name: 'insert', items: [ 'Image', 'Iframe','Table', 'HorizontalRule', 'SpecialChar' ] },
|
|
|
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
|
|
'/',
|
|
|
- { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
|
|
|
+ { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize', 'lineheight' ] },
|
|
|
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
|
|
- { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }
|
|
|
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
|
|
|
+ { name: 'tools', items : [ 'Maximize','-','About' ] }
|
|
|
];
|
|
|
|
|
|
config.toolbar_mini = [
|
|
|
@@ -116,4 +131,6 @@ CKEDITOR.editorConfig = function( config )
|
|
|
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
|
|
{ name: 'maximize'}
|
|
|
];
|
|
|
+
|
|
|
+ // config.extraPlugins += (config.extraPlugins ? ',helloworld' : 'helloworld');
|
|
|
};
|