Validation CKEditor 4中可用的所有工具栏按钮名称和组名称的列表在哪里?

Validation CKEditor 4中可用的所有工具栏按钮名称和组名称的列表在哪里?,validation,ckeditor,Validation,Ckeditor,这个问题类似于和。我在这里补充了我所面临的一些看法和个人困难 CKEditor文档很好,但对于Javascript程序员(第一次使用CKEditor部署程序)来说,这是一个“不完整”的文档,因为“中途停止”。。。示例: 如果需要,我还需要有效名称的列表 如果我需要定制(通过源代码、更改数组元素),我不仅需要线索和示例,还需要一个完整的有效名称列表、语法规则、上下文异常,也许还需要一个“官方插件名称”列表 问题:有一个命令(一个简单的警报(调试))或所有可能名称的文档列表?(或所有受控和注册的

这个问题类似于和。我在这里补充了我所面临的一些看法和个人困难

CKEditor文档很好,但对于Javascript程序员(第一次使用CKEditor部署程序)来说,这是一个“不完整”的文档,因为“中途停止”。。。示例:

  • 如果需要,我还需要有效名称的列表

  • 如果我需要定制(通过源代码、更改数组元素),我不仅需要线索和示例,还需要一个完整的有效名称列表、语法规则、上下文异常,也许还需要一个“官方插件名称”列表

问题:有一个命令(一个简单的
警报(调试)
)或所有可能名称的文档列表?
(或所有受控和注册的插件名称、组名称等)


。。。CKEditor4被提升为(最好的!)“即插即用”编辑器,但对于程序员来说,它是错误的,没有适当的“管理受控名称”支持

注意:所有
config.js
都需要引用有效名称,并且没有文档显示我在
config.js
数组中所做更改的所有有效名称列表。这是程序员所需要的一切,但今天(2013年8月),我们需要花费大部分时间使用谷歌来查找有效名称,或者使用浏览器的“元素检查器”来获取有关它的线索。由于没有名字,在配置数组中没有简单的编程任务

梦想:为网页设计师提供一个好的“自定义编辑器”(!!)。但对于开发人员来说,没有显示“按钮图标和相关名称”或组名等的工具或插图。。。也就是说,“从要素到名称的有组织映射”(反之亦然)。当然,对于每个映射,我们还需要“上下文异常”,如



更多实用示例,在@Noseratio和@davidkonrad注释后编辑)。问题是“每个上下文的有效名称是什么?”

如果我的
配置中有

editor.config.toolbarGroups = [
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
             ...
    { name: 'styles' },
    { name: 'colors' },
];
我需要将
{name:'styles'}
更改为自定义的,例如,我需要以下函数:

  { name: 'styles', items : [ 'Styles', 'Format', 'FontSize' ] }
因此,我需要知道所有这些名称,以及何时(上下文)将属性“name”、“items”、“groups”与这些名称一起使用。如果在toolbarGroups属性中使用“items”,或者使用“Fontsize”而不是“Fontsize”,则会出现错误。另外,对于
addButtonCommand
和其他命令,我需要知道任何有效参数。定义,

  addButtonCommand( 'FontSize', lang.underline, 'underline',
                     config.coreStyles_underline );
但如果不知道每个上下文的“所有有效名称列表”,则很难工作


更多实用示例,在@MahanGM comment之后编辑)

如果我使用 (也就是说),当使用CKEditor4和内联编辑器时,我有“名称问题”:

  • “默认编辑器工具栏设置”是“完整工具栏”吗

  • 如果我去掉“拼写检查器”(旧v3名称“拼写检查器”),为什么不工作?为什么还需要起飞呢

  • 内联编辑器可以使用哪些名称?何时使用组以及何时使用
    editor.config.toolbar
    数组中的项

  • 。。。等(阅读我的问题:所有问题都是在上下文中正确选择有效名称)。。。程序员需要一个“完整的”,不仅仅是线索和信息片段

(这不是答案,而是建议,您可以复制/粘贴以发布您的答案)

(您也可以在此处进行协作编辑)

“逐项”配置 编辑器的工作方式与“工具箱定义”完全相同:一个简单的JavaScript数组

config.toolbar = [ G1, G2, ..., GN ];
通过其内容和定义其精确位置来控制“工具箱中的每个工具栏”。 工具栏定义Gi可以是数组或字符串:

  • 当Gi是字符串时,它是条线分隔符,
    '/'
  • 当Gi是数组时,它是按钮名称(别名“项”)的序列(别名“组”)
所以,一般形式的

其中,ITEMi,j是有效的按钮名称。在它里面,

2013年8月使用CKEditor v4的配置场景(定义“名称空间”):

  • git克隆git://github.com/ckeditor/ckeditor-releases.git

  • 其他插件或代码较少的

  • 其他具有更多(正式注册的名称空间)插件的

  • BUTNAME
    s有效的软件上下文:

    • 已安装关联插件(请参见下表“有效ButName的完整列表”)(请参见场景1、2或3)

    • 但是名称不在
      config.removeButtons
      列表中,相关插件也不在
      config.removePlugins
      中删除

    • 。。。BUTNAME是为该CKEditor版本定义的(例如,对于v4使用“拼写检查器”,对于v3使用“拼写检查器”)

    所有注册的插件名称 请参见场景1中的
    config.plugins
    ,这是插件所有有效名称的列表(字母顺序):

    它们也是“插件”还是“外插件”?见情景3:

    附:场景1。在
    plugins/
    目录中,我们只有

    a11yhelp   dialog           icons.png  magicline      specialchar  wsc
    about      fakeobjects      image      pastefromword  table
    clipboard  icons_hidpi.png  link       scayt          tabletools
    
    有效名称的完整列表 所有名称和相关上下文的规范。插件由“-1”或“-3”固定以记住场景的“名称空间”

    (如果我们能完成这张表,这个答案就完整了!)

    这张表对我帮助很大:

    // Toolbar configuration generated automatically by the editor based on config.toolbarGroups.
    config.toolbar = [
        { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
        { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
        { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
        { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
        { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], 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: 'others', items: [ '-' ] },
        { name: 'about', items: [ 'About' ] }
    ];
    

    在自己的初始化中使用时:

    CKEDITOR.replace( 'topicMessageInput', {
            toolbar: [
                    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
                    { na..
    

    希望有帮助。

    问得好。我经常在CKEditor源代码中交叉搜索
    addCommand
    addButtonCommand
    。你说得对,多亏了try(!),删除了“答案”(没有注意)。我编辑添加了“更多实用示例”。@nosertio,感谢您记住
    addButtonCommand
    这是另一个很好的“配置工具”,但它还需要程序员知道“名称”(参见我的新示例)。我的问题是u的名字和上下文
     texttransform, etc.
    
    a11yhelp   dialog           icons.png  magicline      specialchar  wsc
    about      fakeobjects      image      pastefromword  table
    clipboard  icons_hidpi.png  link       scayt          tabletools
    
    BUTNAME                  | PLUGIN            |  Invalid context
    -------------------------|-------------------|------------------
    Bold                     | default-1         | ?Always ok? no excetions?
    Italic                   | default-1         | ...
    ...                      | ...               | ...
    Source                   | default-1         | not works with inline editor
    ...                      | ...               | ...
    TransformTextToUppercase | texttransform-3   | scenario-1
    TransformTextCapitalize  | texttransform-3   | scenario-1
    ...                      | ...               | ...
    
    // Toolbar configuration generated automatically by the editor based on config.toolbarGroups.
    config.toolbar = [
        { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
        { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
        { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
        { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
        { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], 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: 'others', items: [ '-' ] },
        { name: 'about', items: [ 'About' ] }
    ];
    
    // Toolbar groups configuration.
    config.toolbarGroups = [
        { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
        { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'forms' },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
        { name: 'links' },
        { name: 'insert' },
        '/',
        { name: 'styles' },
        { name: 'colors' },
        { name: 'tools' },
        { name: 'others' },
        { name: 'about' }
    ];
    
    CKEDITOR.replace( 'topicMessageInput', {
            toolbar: [
                    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
                    { na..