loyals-online/silverstripe-tinymce4

setOption('style_formats') not working

Closed this issue · 3 comments

I'm using latest SilverStripe 3.5.0 and I can't get style_formats to append in editor:

my code:

$formats = array(
  array('title' => 'Big text', 'selector' => 'p', 'classes' => 'lead'),
  array('title' => 'Set responsive table', 'selector' => 'table', 'classes' => 'table')
);

CustomHtmlEditorConfig::get('cms')->setOption('style_formats', $formats);

gavro commented

@darianno could you check if the solution in this closed issue solves your problem?

I've tried CustomHtmlEditorConfig::get('cms')->disablePlugins('importcss') but it does not work.

trick with creating dummy module /zconfig/_config.php worked.