I've got a very simple widget, where I want the user to edit HTMLText field. I've tried
HTMLEditorField, SimpleTinyMCEField and SimpleWysiwygField from the DOM.
The HTMLEditorField shows the editor, but the content is neither loaded nor saved. SimpleTinyMCEField and SimpleWysiwygField show the content but not any tiny mce editor fields.
Any pointers to get this working?
<?php
class HTMLTextWidget extends Widget {
static $db = array(
'Title' => 'Text',
'WidgetContent' => 'HTMLText',
);
static $title = "Content";
static $cmsTitle = "Content Widget";
static $description = "Add a content block to the sidebar";
function Title() {
return $this->Title;
}
function getCMSFields() {
return new FieldSet(
new TextField("Title", "Title"),
//new HTMLEditorField("WidgetContent", "Content")
new SimpleTinyMCEField("WidgetContent", "Content")
//new SimpleWysiwygField("WidgetContent", "Content")
//new TextareaField("WidgetContent", "Content")
);
}
}
?>