2. ckeditor 툴바 변경
그림 2-1 ckeditor의 모든 툴바
각 아이템의 이름이 순서대로 나열되었으니 참조할 것.(대소문자 구별)
'-'는 세로 구분선을 나타내고 '/'는 줄바꿈을 나타낸다.
CKEDITOR.editorConfig = function( config ) {
config.toolbar = [
{ name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
{ name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
'/',
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
'/',
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
{ name: 'about', items: [ 'About' ] }
];
};
-필요한 아이콘만으로 재구성하기
config.js를 아래와 같이 수정 또는 추가한다.
CKEDITOR.editorConfig = function( config ) {
config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
{ name: 'forms', groups: [ 'forms' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
{ name: 'links', groups: [ 'links' ] },
'/',
{ name: 'insert', groups: [ 'insert' ] },
{ name: 'colors', groups: [ 'colors' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'styles', groups: [ 'styles' ] },
'/',
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
]; //여기까지는 사용되는 모든 툴바의 그룹이 설정되어 있다.
config.removeButtons = 'Save,NewPage,Preview,Print,Templates,Cut,Copy,Paste,PasteText,PasteFromWord,Find,Replace,SelectAll,Scayt,Form,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Strike,Subscript,Superscript,Checkbox,NumberedList,BulletedList,Indent,Outdent,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,JustifyBlock,Anchor,Flash,HorizontalRule,PageBreak,Iframe,Styles,Format,ShowBlocks,About';
}; //쓰지 않을 툴바의 이름을 여기에 적으면 된다.(대소문자 구별)
'COMPUTER > WEB PAGE 꾸미기' 카테고리의 다른 글
5. ckeditor Custom config. (0) | 2017.03.31 |
---|---|
4.ckeditor 기타 설정. (크기, 플러그인, 스킨, 줄 간격, 변수저장 등) (0) | 2017.03.31 |
3. ckeditor 글꼴 및 언어 설정 (0) | 2017.03.31 |
1. CKEditor 설치 및 적용 (0) | 2017.03.31 |
크롬, 파이어폭스에서 웹페이지 갱신하기. (0) | 2017.03.30 |