向资产类型添加大文本字段并设置多信息文本编辑器的外观后,您可以创建定制工具栏。
工具栏预填充了标准工具栏组和选项,您可以查看其预览。
要定制工具栏,请单击 JSON 选项卡,并使用 CKEditor 语法编辑 JSON 配置。请参见 https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#basic。
大文本字段支持以下组:
"basicstyles" — 限定为粗体/斜体/下划线 https://ckeditor.com/cke4/addon/basicstyles
"styles" — 字体样式 https://docs.ckeditor.com/ckeditor4/latest/guide/dev_styles.html
"colors" — 文本和背景颜色 https://docs.ckeditor.com/ckeditor4/latest/guide/dev_colorbutton.html
"undo" — 对编辑器中的当前实例执行撤消/重做
"links" - 用于链接对话框的定制插件
"paragraph" — 带项目符号/编号的列表和缩进支持
"list"
"indent"
"align" — 左对齐/右对齐/居中对齐
"insert"
"image"
"table"
"cleanup" — 删除选定文本的样式
此外,还可使用行分隔符条目:"/"
注:
如果您在工具栏组配置中设置了任何其他值,在创建站点构建器工具栏之前将删除该值。您无法提供 "extraPlugins"。只支持 "name"/"groups" 配置。将忽略所有 "items" 条目。对于属性,可以使用 "toolbarGroups" 和 "removeButtons" 或 "toolbar"。请参见以下示例。
示例 2-1 选项 1:"toolbarGroups" 和 "removeButtons"
{
"toolbarGroups": [
{"name": "basicstyles"}
,
{"name": "styles"}
,
{"name": "colors"}
,
{"name": "clipboard"}
,
"/",
{"name": "links"}
,
{"name": "insert"}
,
{"name": "paragraph","groups": ["list","indent"]}
,
{"name": "align"}
,
{"name": "undo"}
,
{"name": "cleanup"}
,
{"name": "mode"}
,
{"name": "tools"}
],
"removeButtons": "Styles,Subscript,Superscript,Anchor,Blockquote,PasteFromWord,Copy,Cut"
}示例 2-2 选项 2:"toolbar"
{
"toolbar" = [
{ "name":"basicstyles","items":["Bold","Italic","Underline","Strike","Subscript","Superscript","-","CopyFormatting","RemoveFormat"] }
,
{ "name":"paragraph","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":"about","items":["About"] }
]}