London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi,
I don't think so, doesn't seem to be possible in TinyMCE either.
You should be able to group style formats, which is as simple as:
.StyleFormats
(
new
{
title = "Red",
items = new[] {
new { title = "Red text", block = (string) null, inline = "span", styles = new { color = "#ff0000" } },
new { title = "Red header", block = "h1", inline = (string) null, styles = new { color = "#ff0000" } },
}
},
new
{
title = "Green",
items = new[] {
new { title = "Green text", inline = "span", styles = new { color = "#00ff00" } }
}
}
);
Is there a way to have different StyleFormats for different styleselects
In this example I would like the styleselect by the epi-link and anchor to only show button-style1 and the styleselect by the bullist an numlist to display the list-styles. Is it possible to differentiate the StyleFormats in that way?
config.Default() .AddEpiserverSupport() .AddPlugin("media wordcount anchor code lists") .Toolbar( "epi-link anchor styleselect | image epi-image-editor media | epi-dnd-processor", "bold italic underline | alignleft aligncenter alignright | bullist numlist styleselect | formatselect removeformat code") .StyleFormats( new { title = "list-style1", selector = "ul", classes = "list-styled" }, new { title = "list-style2", selector = "ol", classes = "list-styled" }, new { title = "list-style3", selector = "ul", classes = "list-styled list-styled--checklist" }, new { title = "button-style1", selector="a", classes = "btn btn--primary" }) .ContentCss("/Static/styles/editor.css");