Try our conversational search powered by Generative AI!

Insert script tag through Page/Block editing view (TinyMCE)



what would be the most preferable way to support inserting of script tag through TinyMCE when editing Page/Block?


Sep 10, 2019 16:38


You can configure it in the initilization module.

    public class TinymceCustomInitialization : IConfigurableModule
        public void ConfigureContainer(ServiceConfigurationContext context)
            // browser console to see settings: window.tinymce.settings;

            context.Services.Configure<TinyMceConfiguration>(config =>
                    .AddSetting("extended_valid_elements", "script[language|type|src]");

        public void Initialize(InitializationEngine context) { }

        public void Uninitialize(InitializationEngine context) { }
Sep 10, 2019 17:08
fuji - Sep 11, 2019 10:55
Perfect! Thanks :)
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.