Cho mình hỏi cách cấu hình config Config toolbar toolbarGroups editorConfig của ckeditor như thế nào vậy? mình muốn ẩn hiện cái config các item của nó như thế nào các bạn nào biết chỗ nào tổng hợp để mình điều chỉnh điều hướng được không? Hiện tại cái config của mình nó hiện hết lên rất khó chịu, nhiều cái không cần xài thì nó cứ hiện, cảm ơn.
Bên CKeditor có cung cấp cho bạn 1 công cụ khá hư ích để chỉnh sửa trực quan và lấy về thống số config rất dễ dàng tại link dưới nhé, bạn vào đó check chọn cái cần và lấy về config thôi, khá đơn giản. Link: https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#basic VD: 1 config chuẩn tải về ở link trên như sau PHP: /** * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license */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: 'styles', groups: ['styles'] }, { name: 'colors', groups: ['colors'] }, { name: 'tools', groups: ['tools'] }, { name: 'others', groups: ['others'] }, { name: 'about', groups: ['about'] } ]; config.removeButtons = 'JustifyCenter,JustifyRight,JustifyBlock,Styles,Font,FontSize,JustifyLeft,Outdent,Indent,CreateDiv'; config.entities_latin = true; config.htmlEncodeOutput = false; config.entities = false; config.uiColor = '#66AB16'; config.width = '100%'; config.height = '800px'; // Set the most common block elements. config.format_tags = 'p;h1;h2;h3;pre'; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; config.language = 'vi'; // config.uiColor = '#AADC6E'; config.ForceSimpleAmpersand = true; config.extraPlugins = 'youtube'; config.youtube_responsive = true; config.youtube_related = true;}; PHP: <script src="~/ckeditor/ckeditor.js"></script><script src="~/ckfinder/ckfinder.js"></script><script> CKFinder.setupCKEditor(null, '/ckfinder'); CKEDITOR.replace('idckeditor');</script>