Tamara

@Kartavya Desai Siteconfig is already available in the templates. For example, if you want to get the site title which you can set in the site config, just use: $SiteConfig.Title

Tamara

@gened I'm having the same problem... Were you able to fix this?

Tamara

@palo Do you want your theme to be loaded as the first one?

Tamara

You can use renderWith('Controller_template') for that

Tamara

Got it! Adding ->removeButtons('underline') fixed it for me 🙂

Tamara

I've tried to remove -u[class], but no luck with that...

  1. TinyMCEConfig::get('mycustom')
  2. ->setOptions([
  3. 'friendly_name' => 'my custom style',
  4. 'priority' => '50',
  5. 'skin' => 'silverstripe',
  6. 'body_class' => 'typography',
  7. 'contextmenu' => "",
  8. 'use_native_selects' => false,
  9. 'valid_elements' => "@[id|class|style|title],"
  10. . ",-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align|style],-ol[class],"
  11. . "-ul[class],-li[class],br,"
  12. . "-sub[class],-sup[class],-blockquote[dir|class],-cite[dir|class|id|title],"
  13. . "-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],"
  14. . "-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|dir|class|align|style],hr[class],"
  15. . "dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir]",
  16. 'extended_valid_elements' => ""
  17. ])->disablePlugins(['table']);
Tamara

How can I remove the underline option from the WYSIWYG editor?