Tags: CMS12 Optimizely/Episerver

Breaking changes in EPiServer.CMS.TinyMce 4.0.0

In December 2022 Optimizely released version 4.0.0 of EPiServer.CMS.TinyMce featuring the latest version of the TinyMCE 6 library.

After upgrading, my TinyMCE editor was missing the format dropdown. A simplified version of my configuration looked like this.

config.Default()
    .AddEpiserverSupport()
    .AddPlugin("epi-link code image paste searchreplace code lists codesample")
    .Toolbar("formatselect | epi-link unlink image | bullist numlist | searchreplace | undo redo | codesample code")
    .AddSetting("block_formats", "Normal=p;Heading 2=h2;Heading 3=h3;Heading 4=h4");

However, this part was previously added to the toolbar using the keyword formatselect were missing!

TinyMCE med format nedtrekkslisten uthevet

Why? Because TinyMCE decided to rename some things! Now, formatselect are called blocks. Also styleselect are now calles styles.

Changing formatselect to blocks, everything works as before.

config.Default()
    .AddEpiserverSupport()
    .AddPlugin("epi-link code image paste searchreplace code lists codesample")
    .Toolbar("blocks | epi-link unlink image | bullist numlist | searchreplace | undo redo | codesample code")
    .AddSetting("block_formats", "Normal=p;Heading 2=h2;Heading 3=h3;Heading 4=h4");
});

That's all!

Found this post helpful? Help keep this blog ad-free by buying me a coffee! ☕