Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » SilverStripe Admin - Editor Scrollbar

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1193 Views
  • efrancesco
    Avatar
    3 Posts

    SilverStripe Admin - Editor Scrollbar Link to this post

    I was wondering if there is any way to get rid of the HTML Editor's 'Scrollbar' in SilverStripe Admin? I don't have a big screen or a huge monitor so at times when working with SS I have two or three scrollbars and it makes the UI difficult to work with. I tried editing css to reduce the height of the editor but it didn't work. Any suggestions will be welcomed.

    Here's a pic of what I'm talking about:

    Attached Files
  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: SilverStripe Admin - Editor Scrollbar Link to this post

    The height of the LeftAndMain panels are calculated with javascript and I would not go into changing that.

    What if you plan to attach a $has_many relation with a DataObject that shows in a list that don't fit in the tab and you have no scrollbars?

    And also the RightPanel for adding Links and Images needs probably the scrollbar to show the whole panel.

  • efrancesco
    Avatar
    3 Posts

    Re: SilverStripe Admin - Editor Scrollbar Link to this post

    All I'm really trying to do is reduce the height of of the HTML Editor Area, the area where the content appears for editing. Reducing that will eliminate the scrollbar. Surely that wouldn't interfere with other SS functionality or would it?

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: SilverStripe Admin - Editor Scrollbar Link to this post

    Ah, misunderstood.

    You can add this to Page.php to overload the default Content HTMLEditorField and set the rows and cols:

    function getCMSFields() {
          $f = parent::getCMSFields();
          $f->addFieldFromTab('Root.Content.Main',
             new HtmlEditorField('Content', _t('SiteTree.HTMLEDITORTITLE', "Content", PR_MEDIUM, 'HTML editor title'), $rows = 30, $cols = 20)
          );
          return $f;
       }

    See sapphire/forms/HtmlEditorField.php for more info.

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