Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

SilverStripe Admin - Editor Scrollbar


Go to End


4 Posts   1922 Views

Avatar
efrancesco

3 Posts

14 September 2010 at 2:55pm

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
Avatar
Martijn

Community Member, 271 Posts

14 September 2010 at 9:55pm

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.

Avatar
efrancesco

3 Posts

14 September 2010 at 11:36pm

Edited: 14/09/2010 11:40pm

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?

Avatar
Martijn

Community Member, 271 Posts

14 September 2010 at 11:54pm

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.