0

我想从菜单栏中自定义格式选项。我们能够自定义选项,但是,面临以下问题。

在此处输入图像描述

我们希望用户在悬停格式时看到的内容应该出现在格式的位置。

该列表应如下所示。

  1. 格式(菜单栏)标题内联块清除格式

我们想从下拉列表中删除“格式”选项。

下面是我们的代码。

 menu: { 
    edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall'},
    insert: {title: 'Insert', items: 'link media | template hr'},
    view: {title: 'View', items: 'showblock visualaid'},
    format: {title: 'Format', items: 'formats removeformat'},
    table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'},
    tools: {title: 'Tools', items: 'spellchecker code'}
  },
  style_formats: [
   { title: 'Headings', items: [
      { title: 'Heading 3', block: 'h3' },
      { title: 'Heading 4', block: 'h4' },
      { title: 'Heading 5', block: 'h5' },
      { title: 'Heading 6', block: 'h6' }
    ] },
    {title: 'Inline', items: [
              {title: 'Bold', icon: 'bold', format: 'bold'},
              {title: 'Italic', icon: 'italic', format: 'italic'},
              {title: 'Underline', icon: 'underline', format: 'underline'},
              {title: 'Strikethrough', icon: 'strikethrough', format: 'strikethrough'},
              {title: 'Superscript', icon: 'superscript', format: 'superscript'},
              {title: 'Subscript', icon: 'subscript', format: 'subscript'}
          ]},
          {title: 'Blocks', items: [
              {title: 'Paragraph', format: 'p'},
              {title: 'Blockquote', format: 'blockquote'},
              {title: 'Div', format: 'div'},
              {title: 'Pre', format: 'pre'},
     {title : 'Code', block : 'pre', classes : 'ckeditor_codeblock', exact: true}
          ]}
      ]

任何帮助,将不胜感激 :)

4

0 回答 0