--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
This is how I solved it for 2.4: https://github.com/silverstripe-labs/silverstripe-recipes/blob/master/forms/CustomConfigHtmlEditorField.php
(sorry for brevity, on holiday ATM)
Hamish
My suggestion is to add HtmlEditorField->setConfigName(),which defaults to HtmlEditorConfig::get_active().The CMS then renders all defined configs on the initial load,so similar to the process at the moment, but keyed by their "name".You wouldn't be able to do HtmlEditorField->getConfig()->->enablePlugins('media')etc on an instance, but I think that's an acceptable limitation.
--
On 8/06/2013 3:22 a.m., Ingo Schommer wrote:
My suggestion is to add HtmlEditorField->setConfigName(),which defaults to HtmlEditorConfig::get_active().The CMS then renders all defined configs on the initial load,so similar to the process at the moment, but keyed by their "name".You wouldn't be able to do HtmlEditorField->getConfig()->->enablePlugins('media')etc on an instance, but I think that's an acceptable limitation.
I think this is basically what I did here: https://github.com/nathancox/silverstripe-customhtmleditorfield. It's not super pretty but it seems to be working.
Basically it puts all the configs in a javascript array on page load then uses a data- attribute on each HTMLEditorField to determine which one to apply.
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-dev+unsubscribe@googlegroups.com.
To post to this group, send email to silverstripe-dev@googlegroups.com.