Implement simple toolbar option for CKEditor

This commit is contained in:
Kijin Sung 2017-06-27 18:16:12 +09:00
parent 4adf223524
commit 63160bf5bf
2 changed files with 14 additions and 1 deletions

2
modules/editor/skins/ckeditor/css/default.css Executable file → Normal file
View file

@ -1 +1,3 @@
p.editor_autosaved_message.autosave_message {display:none;background: #f6ffdb;padding:6px 10px;margin:0;line-height:1;}
span.cke_combo__fontsize .cke_combo_button { width: 64px; }
span.cke_combo__fontsize .cke_combo_text { width: 30px; }

View file

@ -100,6 +100,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
fontSize_defaultLabel: default_font_size,
fontSize_sizes: font_sizes,
toolbarCanCollapse: true,
allowedContent: true,
language: "{str_replace('jp','ja',$lang_type)}"
},
loadXeComponent: true,
@ -135,7 +136,17 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
<!--@endif-->
settings.ckeconfig.toolbarStartupExpanded = {$editor_toolbar_hide ? 'false' : 'true'};
<!--@if($editor_toolbar === 'simple')-->
settings.ckeconfig.toolbar = [
{ name: 'styles', items: [ 'Font', 'FontSize', '-', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor' ] },
{ name: 'paragraph', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste' ] },
{ name: 'insert', items: [ 'Link', 'Image', 'Table' ] },
{ name: 'tools', items: [ 'Maximize', '-', 'Source' ] }
];
<!--@endif-->
<!--@if(!$html_mode)-->
settings.ckeconfig.removeButtons = 'Save,Preview,Print,Cut,Copy,Paste,Source';
<!--@endif-->