Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Tinymce valid options in 3.x ?

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 767 Views
  • martbarr
    Avatar
    Community Member
    46 Posts

    Tinymce valid options in 3.x ? Link to this post

    Are they listed anywhere?

    I used to use this in 2.4.10 but it breaks somehow in 3.05:-
    $htmlEditorConfig = HtmlEditorConfig::get('cms');
    $htmlEditorConfig->setOption('forced_root_block','');
    $htmlEditorConfig->setOption('force_br_newlines',true);
    $htmlEditorConfig->setOption('force_p_newlines',false);
    $htmlEditorConfig->setOption('convert_newlines_to_brs',false);
    $htmlEditorConfig->setOption('invalid_elements','p');
    $htmlEditorConfig->setOption('paste_auto_cleanup_on_past',true);
    $htmlEditorConfig->setOption('paste_remove_styles',true);
    $htmlEditorConfig->setOption('paste_remove_styles_if_webkit',true);
    $htmlEditorConfig->setOption('paste_strip_class_attributes',true);
    $htmlEditorConfig->removeButtons('underline', 'ssflash');
       
    I need enter key to give me a new line and not a paragraph break, and ideally remove the <p> tags as well although some disagree on that approach.

    Anywhere I can look please?
    thanks
    Martin

  • martbarr
    Avatar
    Community Member
    46 Posts

    Re: Tinymce valid options in 3.x ? Link to this post

    These three lines work for me in my _config.php :-

    $htmlEditorConfig = HtmlEditorConfig::get('cms');
    $htmlEditorConfig->setOption('theme','advanced');
    $htmlEditorConfig->setOption('forced_root_block','');

    cheers
    Martin

    767 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.