Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Using several HTMLEditor Configs in CMS

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

Page: 1
Go to End
Author Topic: 1032 Views
  • Lukin
    Avatar
    Community Member
    42 Posts

    Using several HTMLEditor Configs in CMS Link to this post

    Hi,

    I need two different configs for my htmlEditorFields...

    I put that code in my class-file to delcare my cusom config and added a second HTMLEditorField, work's fine
    but the Content HTMLEditor uses my custom config too

    I tried to set_active the standard config after adding my second editor but that doesn't help..

    HtmlEditorConfig::get('reduced')->disablePlugins('table');
          HtmlEditorConfig::get('reduced')->setButtonsForLine(1,
           'bold','italic','underline','strikethrough','separator',
           'formatselect','separator',
           'sslink','unlink','separator',
           'bullist','numlist','hr','charmap'
          );
          HtmlEditorConfig::get('reduced')->setButtonsForLine(2);
          HtmlEditorConfig::get('reduced')->setButtonsForLine(3);
          
          $zusatzZeile=new HtmlEditorField('Zusatzzeile','ZusatzZeile',1);
          HtmlEditorConfig::set_active('reduced');
          $fields->addFieldToTab('Root.Content.Main',$zusatzZeile,'Content');
          HtmlEditorConfig::set_active('cms');

    thanks in advance

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Using several HTMLEditor Configs in CMS Link to this post

    I had the same problem once. The problem turned out to be the priority of the config.
    See this thread: http://www.silverstripe.org/general-questions/show/280243

    1032 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.