这个没有支持。相反,您可以将这些项目添加到style_formats
中,请参见https://www.tinymce.com/docs/configure/content-formatting/#style_formats。有关如何自定义编辑器的更多信息,请参见https://world.episerver.com/documentation/developer-guides/CMS/add-ons/customizing-the-tinymce-editor-v2/。以下是一个示例配置:
config
.Default()
.Schema(TinyMceSchema.Html5Strict)
.ContentCss("/gui/css/base.css")
.AddPlugin("link table paste code contextmenu")
.Toolbar(
"styleselect undo redo pastetext removeformat searchreplace code fullscreen",
"bold italic numlist bullist outdent indent table epi-link unlink image epi-image-editor epi-personalized-content")
.StyleFormats(
new { title = "Paragraph", format = "p" },
new { title = "Header 2", format = "h2" },
new { title = "Header 3", format = "h3" },
new { title = "Header 4", format = "h4" },
new
{
title = "Inline",
icon = "forecolor",
items = new[]
{
new { title = "Strikethrough", format = "strikethrough", icon = "strikethrough" },
new { title = "Superscript", format = "superscript", icon = "superscript" },
new { title = "Subscript", format = "subscript", icon = "subscript" },
new { title = "code", format = "code", icon = "code" }
}
},
new
{
title = "Blocks",
icon = "template",
items = new[]
{
new { title = "Blockquote", format = "blockquote" },
new { title = "Preformatted", format = "pre" },
}
},
new
{
title = "Images",
icon = "image",
items = new[]
{
new { title = "Left", selector = "img", classes = "left", icon = "alignleft" },
new { title = "Right", selector = "img", classes = "right", icon = "alignright" },
new { title = "Full-width", selector = "img", classes = "fullwidth", icon = "alignjustify" }
}
},
new
{
title = "Tables",
icon = "table",
items = new[]
{
new { title = "Left", selector = "table", classes = "left", icon = "alignleft" },
new { title = "Right", selector = "table", classes = "right", icon = "alignright" },
new { title = "Full-width", selector = "table", classes = "fullwidth", icon = "alignjustify" }
}
});