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 Erik,
The following worked for me (although, to be honest, I wasn't really expecting it to!):
config.Default()
.StyleFormats(new
{
title = "Alignment",
items = new[]
{
new {title = "Left", block = "p", styles = new Dictionary<string, string> {{"text-align", "left"}}},
new {title = "Center", block = "p", styles = new Dictionary<string, string> {{"text-align", "center"}}},
}
});
Hi,
So the new tinymce editor, conveniently, all the examples of setting styles using anonymous objects in C# is using the example "color", but what do I do if I want to set another style, say text-align?
This will obviosuly not compile:
configuration.Default() .StyleFormats(new { title = "Alignment", items = new[] { new {title = "Left", block = "p", styles = { text-align = "left"}}, new {title = "Center", block = "p", styles = { text-align = "center"}} })...
I have tried various different strings with no success, like styles = "text-align: center". I am guessing there is one, but I am just not able to guess it.
Anyone have an idea how to achieve this?