Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to allow style tags in TinyMCE?

$
0
0

I thought this was an easy one, just use extended_valid_elements, right?

So, i tried this:

        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Services.Configure<TinyMceConfiguration>(config =>
            {
                // Add content CSS to the default settings.
                config.Default()
                    .AddSetting("extended_valid_elements", "script[*],style[*],iframe[*]")
                    .AddPlugin("code")
                    .Toolbar("code");
            });
        }

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/


Viewing all articles
Browse latest Browse all 8020

Trending Articles