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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

TinyMCE and multiple Content fields

Go to End

3 Posts   2222 Views


Community Member, 25 Posts

18 November 2008 at 6:43am

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.


Community Member, 470 Posts

18 November 2008 at 7:31am

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


Community Member, 25 Posts

18 November 2008 at 10:05pm

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