Xin cách Config toolbar toolbarGroups editorConfig ckeditor

Thảo luận trong 'Tin tức lập trình Website' bắt đầu bởi seolagi, 10/11/20.

  1. seolagi
    Tham gia ngày:
    16/4/14
    Bài viết:
    1,028
    Đã được thích:
    80
    Điểm thành tích:
    48
    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.

    config-ckeditor.png
     
    Cảm ơn đã xem bài:

    Xin cách Config toolbar toolbarGroups editorConfig ckeditor

  2. admin
    Tham gia ngày:
    22/5/13
    Bài viết:
    4,895
    Đã được thích:
    1,198
    Điểm thành tích:
    113
    Giới tính:
    Nam
    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>
     
    Chỉnh sửa cuối: 10/11/20
    seolagi thích bài này.
  3. seolagi
    Tham gia ngày:
    16/4/14
    Bài viết:
    1,028
    Đã được thích:
    80
    Điểm thành tích:
    48
    Cảm ơn ad, m làm được rồi ạ
     


Chủ để tương tự : cách Config
Diễn đàn Tiêu đề Date
Tin tức lập trình Website Làm sao để học PHP một cách tốt nhất 31/1/18
Tin tức lập trình Website Cách thay đổi đường dẫn đăng nhập Wp-Admin WordPress đơn giản 21/1/16
Tin tức lập trình Website Cách kiểm tra xem website viết bằng ngôn ngữ gì nhanh và hiệu quả nhất 6/1/15
Tin tức lập trình Website Cách gắn bô đếm truy cập histats vào website đếm lượng truy cập web 28/12/14