Does anyone know of a way of getting TinyMCE working in the popup DOM window. I am using HTMLEditorField which is just displaying a standard textarea with no toolbar.
Thanks
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Does anyone know of a way of getting TinyMCE working in the popup DOM window. I am using HTMLEditorField which is just displaying a standard textarea with no toolbar.
Thanks
Use SimpleWysiwygField. http://doc.silverstripe.org/doku.php?id=simplewysiwygfield
Thank you - but I could do with a little more help with integration of this into my existing code. This field is to replace the existing TextAreaField - Description:
<?php
class InfoBox extends DataObject
{
static $db = array (
'Title' => 'Text',
'Description' => 'Text',
'Link' => 'Text'
);
static $has_one = array (
'HomePage' => 'HomePage',
'MultiBox' => 'MultiBox',
'DropDown' => 'DropDown',
'Image' => 'Image'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Title'),
new TextAreaField('Description'),
new TextField('Link'),
new ImageField('Image')
);
}
}
?>
There's an example right in the documentation I sent you. It should be as easy as replacing TextareaField with SImpleWysiwygField, and you can customize from there if you want.
I did try this but got the error message: Fatal error: Class 'SimpleWysiwygField' not found
When did you last run an update? It's been in the package for a while now.