Hmmm, I don't think I can make this change right now...

For a global content_css value you can extend richtext.cfc and set a 
default value for the ftContentCSS attribute, and this will apply to all 
rich text areas (this is generally what you want). But you can also 
override ftContentCSS on individual formtool properties in your content 
types (same goes for width and height).

If I move the global configJS to the bottom, then it will break any 
formtool properties that have css/width/height specified individually (if 
they are also present in the global config). So any changes that you want 
to make "globally" for those 3 properties probably need to be done by 
extending richtext.cfc, rather than via the config.

To allow them to be defaulted in the config (rather than extending 
richtext.cfc), and also overridable in each formtool property, I think we'd 
need to do some smarter splitting/parsing of the JS config, or break those 
particular properties out into separate fields in the config (probably the 
better option).

cheers,
Justin


On Saturday, April 5, 2014 6:08:03 PM UTC+11, Jeff Coughlin wrote:
>
> I'm just lazy to do the pull request at the moment (and it's 3am).  I'll 
> do it in the morning if you prefer.  Otherwise the code is below (it's just 
> relocating three lines of code down a few lines).
>
> In core/packages/formtools/richtext.cfc the output of #configJS# should be 
> last.  Currently it is being loaded *before* FarCry's overrides.  Instead 
> we should be allowed to override even FarCry's overrides.  I spent a couple 
> hours trying to figure out why my custom content_css wasn't loading (yeah, 
> I'm an idiot. A simple "view html source" finally clued me in that it was 
> in fact loading, but then FarCry was overriding it with it's own css file). 
>  You can either swap it yourself or use the code block below (I provided 
> the entire <script></script> block for easier reference).  If you move the 
> #configJS# variable yourself (with it's conditional block), just keep in 
> mind that the comma switches to the front of the variable.
>
>
> <script language="javascript" type="text/javascript">
> $j(function() {
> tinymce.init({
> selector: '###arguments.fieldname#',
>
> script_url : '#application.url.webtop#/thirdparty/tiny_mce/tinymce.min.js',
>
> farcryrelatedtypes: #serializeJSON(aRelatedTypes)#,
> optionsURL: 
> "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=templateoptions",
> previewURL: 
> "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=templatehtml",
> image_list : 
> "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=imageoptions&relatedTypename=#arguments.stMetadata.ftImageListFilterTypename#&relatedProperty=#arguments.stMetadata.ftImageListFilterProperty#",
> link_list : 
> "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=linkoptions&relatedTypename=#arguments.stMetadata.ftLinkListFilterTypenames#"
> <cfif len(imageUploadField)>
> , imageUploadField : #serializeJSON(imageUploadField)#
> , imageUploadType : 
> #serializeJSON(arguments.stMetadata.ftImageListFilterTypename)#
> </cfif>
> <cfif len(arguments.stMetadata.ftWidth)>
> ,width : "#arguments.stMetadata.ftWidth#"
> </cfif>
> <cfif len(arguments.stMetadata.ftHeight)>
> ,height : "#arguments.stMetadata.ftHeight#"
> </cfif> 
> <cfif len(arguments.stMetadata.ftContentCSS)>
> ,content_css : "#arguments.stMetadata.ftContentCSS#"
> </cfif> 
> <cfif len(configJS)>
> ,#configJS#
> </cfif>
>  });
> });
> </script>
>
>
>
>
> Jeff
>
> On Apr 5, 2014, at 2:58 AM, Justin Carter <[email protected]<javascript:>> 
> wrote:
>
> Yeah which ever is easiest for you, I don't mind copy and pasting or 
> accepting a pull request :)
> On 05/04/2014 5:45 PM, "Jeff Coughlin" <[email protected]<javascript:>> 
> wrote:
>
>> I'll have to wait until it happens again.  It can sometimes go a hundred 
>> saves without a problem.  I'll let you know.
>>
>> btw, can I just mention a bug fix here for a TinyMCE fix (unrelated), or 
>> should I submit a pull request?  It's just moving three lines of code down 
>> a few lines (it's in the wrong spot).
>>
>> Jeff
>>
>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
--- 
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to