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.

Customising the CMS /

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

how to change width of HTMLEditorField


Go to End


5 Posts   2009 Views

Avatar
astate

Community Member, 35 Posts

19 February 2011 at 2:31pm

Edited: 20/02/2011 2:58am


Hello,
I dont see new field.


I use this /dev/build?flush=1 to create tables and field. (Database build completed!) but no field are create.


(sorry for my language, i am french of canada)

second question:

now i search how to change width of HTMLEditorField in admin section because I want to it in vertical columns

I have and a Requirements::css in php code.
the css field have this inside

form htmleditor  { 
width: 248px; 
}

thanks

Avatar
Willr

Forum Moderator, 5523 Posts

19 February 2011 at 4:20pm

$fields->addFieldToTab('Root.Content.Nouvelles', new TextField('Nouvelles'), 'Nouvelles');

The 3rd parameter to addFieldToTab() is the field name you want the field to appear above so what you're saying in that line is you want the text field to appear above itself which doesn't really work! SilverStripe simply won't add the field. Take off the 3rd parameter.

$fields->addFieldToTab('Root.Content.Nouvelles', new TextField('Nouvelles'));

Avatar
astate

Community Member, 35 Posts

19 February 2011 at 4:23pm

Edited: 20/02/2011 2:55am

ok thanks

now i search how to change width of HTMLEditorField in admin section because I want to it in vertical columns

I have and a Requirements::css in php code.
the css field have this inside

form htmleditor  { 
width: 248px; 
}

Avatar
Willr

Forum Moderator, 5523 Posts

20 February 2011 at 10:15am

If you want vertical columns there are a number of things you have to do, you need to set the width in the CSS but also in the HtmlEditorConfig class. On top of that you will need to float the divs so they all stack up next to one another using float: left or positioning them using relative positioning (or absolute would be easier)

Avatar
astate

Community Member, 35 Posts

21 February 2011 at 2:54am

Edited: 21/02/2011 9:53am

If i change the HtmlEditorConfig class all type page are modified in admin section. I only need this for one type page How i can do this ?