Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi Tom,
Try this-
context.Services.Configure<TinyMceConfiguration>(config =>
{
config.Default()
.AddSetting("valid_children", "+body[style]").AddSetting("extended_valid_elements", "script[language|type|src]");
});
Thanks, Ravindra! It seem to work, but I don't understand why.
This part is allowing script-tags, so it can't be that.
.AddSetting("extended_valid_elements", "script[language|type|src]");
I don't understand how adding style as a valid child of body works, I don't have body-tags inside my TinyMCE-editor. When the page is renderes style ends up as a child of body, but how can TinyMCE know that?
.AddSetting("valid_children", "+body[style]")
Can you provide some insight on why this works? I'm utterly confused :-)
Hi Tom,
I think it just checks for valid_children. Once it's valid then it applies to all the tags until you remove this from any specific tag.
I am also not sure how it is working in the background.
Adding this was enough:
.AddSetting("valid_children", "+body[style]")
Thanks! :-)
I thought this was an easy one, just use extended_valid_elements, right?
So, i tried this:
It does not work. I've tested in EPiServer.CMS.TinyMce 2.10.1 and EPiServer.CMS.TinyMce 2.13.0.
Do I really have to use an TinyMCEPluginNonVisual like descripbed in this 2013-post?
https://www.cjsharp.com/blog/2013/04/15/how-to-add-valid-elements-like-iframes-to-tinymce-in-episerver-7/