在标准版 CKEditor 中无法显示“下划线、下标、上标”

问题描述 投票:0回答:0

CKEditor 标准版默认情况下可能不会在工具栏中显示所有可用按钮,因此您可能需要在 JavaScript 文件中的

config.toolbarGroups
选项中自定义工具栏

几个按钮不像下划线、上标和下标那样出现

var config={
          extraPlugins:['codesnippet','justify','codeTag','font','floating-tools','base64image','showblocks'],
          codeSnippet_theme:'monokai_sublime',
          skin : 'moono-dark',
          height:356
         }


config.toolbarGroups = [
          { name: 'clipboard', groups: [ 'undo','clipboard' ] },
          { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
          { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
          { name: 'forms', groups: [ 'forms' ] },
          { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
          { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
          { 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 = 'Save,NewPage,Print,Templates,Paste,PasteText,PasteFromWord,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CreateDiv,Language,Anchor,Image,Flash,Iframe,About';

editor = CKEDITOR.replace('editor',config);

您可以使用此选项指定应在工具栏中显示哪些按钮组。例如,您可以包含 basicstyles 组来显示粗体、斜体和下划线格式的按钮,或者包含段落组来显示用于创建标题、列表和块引用的按钮。

您还可以使用 ToolbarConfigurator 功能重新排列每个组中的按钮。这允许您自定义工具栏布局以满足您的特定需求和偏好。

CKEditor标准版工具栏解决方案

javascript ckeditor toolbar ckeditor5 ckeditor4.x
© www.soinside.com 2019 - 2024. All rights reserved.