I'm just getting to working with ModelAdmin as well ... looks really promising!
I did some digging into CMSMain and found that the Tiny MCE components are manually added in, so if you just add an HtmlEditorField it's not enough.
I pulled this code from CMSMain. Try adding this to your init() function in your extended ModelAdmin page:
For now, manually including tinymce_src.js in your ModelAdmin subclass is your best bet.
Thanks for the responses, unfortunately just including these makes TinyMCE appear ONCE, but it doesn't save any changes and won't appear after any subsequent AJAX loads. I've been digging through the TinyMCE code and it seems like it breaking because it thinks the editor already exists. No idea why it's not saving, though. Probaby both related to one simple thing that's not happening.
Anyway I'll keep digging around in it later when I have the time and see if I can find the problem.
I'm not sure if this has been solved upstream in 2.4 development, but I've gone ahead and added a patch to the [core] ModelAdmin.js that resolves this issue. The patch is available @ the ticket Ingo opened; http://open.silverstripe.com/ticket/3428
Hope this helps!
i want to use the TinyMCE Editor together with the data object manager. I have to insert tables with text and images into a database field. I have already had a look at HTMLField, SimpleTinyMCEField or SimpleHTMLEditorField. But with these fields can not manage the task.
@Brice: Does this patch resolves this problem? I am using 2.3.3 but my ModelAdmin.js differs from yours?!
@ALL: How can i use TinyMCE together with Uncle Chees Data Object Manager?
Best regards ~ Carsten
i have tested your patch and it works fine for me. Thanks a lot.
Will theses fixes automatically be include in 2.4.0?
For the record it seems to not be included in 2.4, but init() function in extended ModelAdmin page should look like: