TinyMCE 'theme_advanced_blockformats' ignored

Silverstripe Version: “silverstripe/recipe-cms”: “4.x-dev”,

Question:

In SS3 the ‘theme_advanced_blockformats’ option for TinyMCE worked as expected: under the Paragraph dropdown in the HTML editor only the listed block formats appeared.

In SS4.x this option is ignored, and I get Paragraph, Headings 1 to 6, and Preformatted.

Other TinyMCEConfig options and settings work as expected.

In _config.php:

TinyMCEConfig::get('cms')->setOption('theme_advanced_blockformats', 'p,h1,h2,h3,div');

Thanks!

This is a TinyMCE question rather than a Silverstripe CMS one.
theme_advanced_blockformats is an option from TinyMCE 3, but Silverstripe CMS 4 uses TinyMCE 4. You’ll need to find out what the equivalent option is for that version of TinyMCE.

Thanks, found the TinyMCE 4 equivalent, e.g.:

TinyMCEConfig::get(‘cms’)->setOption(‘block_formats’, ‘Paragraph=p; Header 1=h1; Header 2=h2; Header 3=h3; Div=div’);