Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Can't Display HtmlEditorField

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

Page: 1
Go to End
Author Topic: 1470 Views
  • _Vince
    Avatar
    Community Member
    161 Posts

    Can't Display HtmlEditorField Link to this post

    Hi, I have an odd problem. Hopefully a simple one.

    I have a popup where I have added a HtmlEditorField, it refers to a database column set to "HTMLText" but all I get in my popup is a simple textarea field. No WYSIWYG buttons or anything.

    What am I doing wrong?

    class Products extends DataObject {

       static $db = array(
    'Product_Name' => 'Text',
    'Product_Blurb' => 'HTMLText'
    .
    .
    .
    function getCMSFields_forPopup() {

    $fields = new FieldSet();
    $fields->push( new TextField( 'Product_Name', 'Product Name'));
    $fields->push( new HtmlEditorField("Product_Blurb", "Description"));
    .
    .
    .

    Any ideas?

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: Can't Display HtmlEditorField Link to this post

    Hi!

    It's a simple problem indeed: HtmlEditorField does not work in popups. I don't remember why or where did I found the info. I think that the DataObjectManager module implements a simple HTML field for popups.

    Regards,
    Juan

  • _Vince
    Avatar
    Community Member
    161 Posts

    Re: Can't Display HtmlEditorField Link to this post

    Ah... ok, thank you.

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