Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » how to change width of HTMLEditorField

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

Page: 1
Go to End
Author Topic: 1035 Views
  • astate
    Avatar
    Community Member
    35 Posts

    how to change width of HTMLEditorField Link to this post


    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

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: how to change width of HTMLEditorField Link to this post

    $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'));

  • astate
    Avatar
    Community Member
    35 Posts

    Re: how to change width of HTMLEditorField Link to this post

    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;
    }

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: how to change width of HTMLEditorField Link to this post

    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)

  • astate
    Avatar
    Community Member
    35 Posts

    Re: how to change width of HTMLEditorField Link to this post

    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 ?

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