21287 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 855 Views |
-
HTMLEditorField in CTF Pop-up

9 November 2010 at 12:41am Last edited: 9 November 2010 12:43am
Hey
I'm trying to find out if its possible to have a HTMLEditorField in a CTF Pop-up because I'm currently having an issue where a HTMLEditorField is being converted to a Text field.
I've tried a search on this and found a topic in the archive with a similar problem [url=http://silverstripe.org/archive/show/1760]http://silverstripe.org/archive/show/1760
where Ingo says
"HTMLEditorField in CTF popup - don't go there, its a world of pain ;) seriously, there's too many optimizations specific to the main CMS UI to make this generically work on the popup."
is this still the case?
Thanks
Phil -
Re: HTMLEditorField in CTF Pop-up

11 November 2010 at 1:30pm
Yes, I am curious about this too, maybe there is a way of having a non-tinymce in a popup that someone has done instead?
-
Re: HTMLEditorField in CTF Pop-up

18 November 2010 at 2:07pm
Hi, Phill,
Sadly, I think this is still the case.
It's not full featured, but if you use Uncle Cheese's DataObjects Manager module you should be able to use SimpleHTMLEditorField instead of the standard CTF HTMLEditorField. Again, it's not as full featured, but generally it gets the job done (it does have an html view).
Otherwise the 'workaround' for this, if you need a full fledged editor, is to make pages instead of DataObjects. I.e., "MyClass extends Page" instead of "MyClass extends DataObject."
In your page controller that you want that class to be included in, call that class like:
public function MyFunction() {
return DataObject::get_one("MyClass");
}Then in your template.ss file:
<% if MyFunction %>
<% control MyFunction %>
$SomeVariableFromYourClass
<% end_control %>
<% end_if %>Chris.b
| 855 Views | ||
|
Page:
1
|
Go to Top |



