Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » SimpleHTMLEditorField in ModelAdmin?
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: UncleCheese
|
Page:
1
|
Go to End | |
| Author | Topic: SimpleHTMLEditorField in ModelAdmin? | 571 Views |
-
SimpleHTMLEditorField in ModelAdmin?

27 June 2009 at 8:53am
I may be trying to push SilverStipe way beyond it's intended purpose, but it is too late for me to go back now.
One thing I need to do is have an HTMLEditor on a DataObject I am managing with ModelAdmin. The normal HTMLEditorField has problems that SS don't seem to be in a hurry to fix. So I thought that maybe a workaround would be to use SimpleHTMLEditorField. So in my DataObject getCMSFields I replaced the HTMLEditorField with SimpleHTMLEditorField but while the normal one works some of the time the jwywiswg editor doesn't show up at all.
I have the newest DataObjectManager code installed on SS 2.3.2.
Is it possible that the problem that plagues tinymce in ModelAdmin also is the problem with the jwywiswg editor?
-
Re: SimpleHTMLEditorField in ModelAdmin (possible FIX)

14 July 2009 at 10:10am
I ran into the same problem for two client sites at the same time... so I really needed a fix for this. I realize that SS is not actively pursuing supporting HTMLEditorFields in ModelAdmin... but it sure would be a nice addition.
In ModelAdmin.js, around line 187 in 2.3.2... you'll see the form vars. Put the following line in before posting the data to save:
$('#right form textarea').each(function(){
tinyMCE.execCommand('mceRemoveControl', false, $(this).attr('id'));
});Hope it helps! Let me know how it works out for you.
John
-
Re: SimpleHTMLEditorField in ModelAdmin?

14 July 2009 at 4:48pm
I ended up adding a few more iterations of the previously mentioned code block in ModelAdmin.js:
* In the function around line 81 before $('ModelAdminPanel').load() is called
* At the start of both the goBack and goForward functions
| 571 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: There is nobody online.
Welcome to our latest member: Newclear


