7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » SimpleHTMLEditorField
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1055 Views |
-
SimpleHTMLEditorField

3 March 2011 at 5:25pm
Hello,
I have created a new admin module and I am using SimpleHTMLEditorField in the form like this:
function getEditForm($id) {
$validator = new RequiredFields('article_name', 'article_date','article_content');
// Create form fields
$fields = new FieldSet(
// TODO The ID field needs to be hidden but while testing make it readonly
new ReadonlyField('ID','id #',$id),
new TextField('article_name', "Article Name", ""),
$dateField = new DateField('article_date', "Article Date", ""),
new CheckboxField('article_publish',"Publish",""),
new CheckboxField('article_archive',"Archive",""),
new SimpleHTMLEditorField('article_content', "Content")
);The SimpleHTMLEditorField shows when the form loads normally, but it does not show when the form loaded using ajax on the right area of admin panel.
How can I get the SimpleHTMLEditorField working in Ajax form ? Please Help ?
Thanks
-
Re: SimpleHTMLEditorField

4 March 2011 at 4:35am
I think you would need to load jquery.livequery.js and change the JS function that loads SimpleHTMLEditor field to use a livequery handler..
-
Re: SimpleHTMLEditorField

4 March 2011 at 7:06pm
Thanks UncleCheese.
How should I change the JS function to, that loads SimpleHTMLEditorField ?
Also, I want to show HTML editor similar to the one being used in the CMS admin, how can I include all those options in SimpleHTMLEditorField ?
-
Re: SimpleHTMLEditorField

5 March 2011 at 3:48am
You're not going to be able to do that. That instance of TinyMCE has been heavily customised and pretty well baked into CMSMain.
| 1055 Views | ||
|
Page:
1
|
Go to Top |

