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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Problem with Model Admin, HTMLText field and TinyMCE


Go to End


2 Posts   2514 Views

Avatar
mschiefmaker

Community Member, 187 Posts

6 December 2009 at 9:34am

I have setup, as part of modelAdmin:

class Sponsors extends DataObject {

static $db = array(
'Sponsor' => 'Varchar(100)',
'DisplayOrder' => 'Int',
'SponsorsDescription' => 'HTMLText',
);

Everything works fine with this unless I try to edit one Sponsor record after another. For the first record everything displays as it should, for the second I loose the TinyMCE function and just get the text (with HTML) displayed. See attached image. Is the probelm in TinyMCE or can I not use a HTMLText field in Model Admin?

Thanks

Catherine

Avatar
UncleCheese

Forum Moderator, 4102 Posts

6 December 2009 at 9:43am

Yup. HtmlEditorField doesn't work in model admin. Only the first time you load the page. I keep meaning to put in a ticket. There probably already is one.