Try our conversational search powered by Generative AI!

Using Custom TinyMCE Theme

Vote:
 

Hello,

My first post on these forums. I found that when attempting to utilize a custom theme by adding a TinyMCEPluginNonVisual attribute on a class and setting the TinyMCE configuration there, the theme still defaults to "advanced". I found this is due to the following:

In the EPiServer.Editor.TinyMCE.Editor class, AddPluginConfiguration method, there is the following logic:

    if (assembler.ToolbarRows.Count > 0)
    {
        this.InitOptions["theme"] = "advanced";

 

So if there is at least one toolbar row in TinyMCE, it sets the theme to advanced, overwriting a custom theme potentially already set. It would make sense to make sure the theme has not been explicitly set in the custom configuration settings:

if(this.InitOptions["theme"] == null)
{
    this.InitOptions["theme"] = "advanced";
}
    

The only recourse that I see is to edit the advanced theme, which I'd rather not do. Is there any other way?

Thanks,

Travis

#49426
Mar 16, 2011 17:53
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.