Justin,

Hmm... well, it definitely breaks the way FarCry works.  But now that I think 
about it, I like that you can override it in the formtool property.  This will 
allow me to load different css files for different scenarios (like a different 
css file for the sidebar) - this is something I've wanted for a long time, but 
never thought of a good way to handle it.  So it's definitely a good thing.  
The way it stands now, it might confuse some people to know that they can't 
load the custom css file(s) the way the RTE normally allows you to.

Here's a thought.  Maybe keep it the new way, but make a visible note about it 
in the TinyMCE config screen with a link to more info (docs) on how to use it.  
Thoughts?

One other thing that can improve that process... I'd still like to be able to 
set a global one and a FarCry config value would work perfectly for that.  The 
default could be the one you're already using (and maybe set it to the ftHint 
in case people want to reset it), but allow people to override it.  Then they 
can still override for certain scenarios using the property tag for those areas 
where needed.  This way for the majority of cases (basically the body area of 
most pages and custom types), people won't have to set it to the same css file 
each and every time in the property tag - and more importantly they won't have 
to override dmHTML.cfc for every single project just to do the same thing as 
setting a global custom css in a FarCry config.  

Thoughts?

Jeff

btw, I've been doing quite a lot with the new TinyMCE 4 configs and there is 
quite a lot you can do with it for your FC projects.  It's very powerful (once 
you get past the poor/lacking documentation - I had to crawl through some of 
their js to find out a few things you can do).  Maybe someday soon I'll write 
up a good how-to in the FarCry docs for customizing the configs for your 
projects.

On Apr 6, 2014, at 9:03 PM, Justin Carter <[email protected]> wrote:

> 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]> 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]> 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.

-- 
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