Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » TinyMCE and multiple Content fields

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1871 Views
  • JGC
    Avatar
    Community Member
    25 Posts

    TinyMCE and multiple Content fields Link to this post

    I'm trying to allow a user to edit multiple Content fields with the TinyMCE editor in a single page - for example, on the homepage there might be a Featured and a MainContent block.

    The problem I'm finding is that TinyMCE will only apply formatting to ONE field (Content), and even if I add more with

       function getCMSFields() {
          $fields = parent::getCMSFields();

          $fields->addFieldToTab('Root.Content.Main', new TextareaField('HPFeatured', 'Featured Content', 6), 'Content');


    it's just ignoring them and using only the original Content field.

    If I delete the Content field and re-create it, it won't insert any formatting.

    Does anyone know how to apply formatting to other fields with TinyMCE through the admin panel?

    Many thanks.

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: TinyMCE and multiple Content fields Link to this post

    You're using the wrong form type. You want htmleditorfield:

    http://doc.silverstripe.com/doku.php?id=htmleditorfield

  • JGC
    Avatar
    Community Member
    25 Posts

    Re: TinyMCE and multiple Content fields Link to this post

    Hot damn. Found it out not long after I asked, and forgot to update the topic >_< Thanks anyway though

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