Date: Thu, 28 Mar 2024 18:58:09 +0000 (UTC) Message-ID: <423002389.21.1711652289277@3651aae2528c> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_20_1327950938.1711652289277" ------=_Part_20_1327950938.1711652289277 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
FarCry formtools provides default support for the award winning = tinyMCE rich text editor.
Support for alternative rich text editors will be provided through plugi= ns. Official XStandard support is currently in development; FarCry XStandard plugin. Other editors may be supported to varyi= ng degrees through the FarCry developer community.<= /p>
Safari not supported adequately by tinyMCE at this time. You will need t= o use Firefox for operation on OSX.
Formtool metadata for the rich text editor control provides extensive in= tegration with FarCry. By varying the configuration of the editor you can c= ustomise your contributors experience.
Attribute |
Description |
Default Value |
---|---|---|
ftImageArrayField |
Array property in content type containing available images. Is used to p= opulate tinyMCE's external_image_list_url value. |
For example, aobjectids in dmHTML |
ftImageTypename |
The content type representing the image library. |
For example, dmImage in dmHTML |
ftImageField |
The specific field or property in the nominated image library type that = holds the file path for the image to be inserted. Note this can be override= n using "insert templates". |
For example, dmImage.standardImage in dmHTML. |
ftConfig |
Option to override default tinyMCE config. Currently looks for applicati= on.config.#ftConfig#, but this will be replaced with a reference to a speci= fic function local to the calling content type. |
Defaults to a popular collection of plugins and settings. |
ftTemplateTypeList |
List of content types nominated to provide HTML insert options for tinyM= CE editor. Each type must have at least one "insert webskin" associated wit= h it. |
For example, in dmHTML dmImage, dmFile, dmNavigation, and other dmHTML c= ontent items can be directly associated with the content. |
ftTemplateWebskinPrefixList |
The filename prefix used to determine suitable "insert webskins" for the= nominated template types. |
For example, insertHTML. |
ftTemplateSnippetWebskinPrefix |
The content type using hte rich text editor may have some predefined con= tent snippets for use by content contributors. This prefix allows the devel= oper to filter the available list of snippets for the specific instance of = the editor. |
For example, insertSnippet. |
ftLinkListRelatedTypenames |
a list of types that if any objects of that type are related to the curr= ent object via an array property, a link to that object will be presented i= n the richtext popup link list |
For example, "dmFile,dmFlash,dmLink" |
The body field is bound to the aObjectIDs property popu= lating both the Image button drop down and the FarCry button panel display.=
<cfp= roperty name=3D"Body" type=3D"longchar" hint=3D"Main body of content." requ= ired=3D"no" default=3D""=20 =09ftSeq=3D"12" ftWizzardStep=3D"Body" ftFieldset=3D"Body"=20 =09ftType=3D"richtext" ftLabel=3D"Body"=20 =09ftImageArrayField=3D"aObjectIDs" ftImageTypename=3D"dmImage" ftImageFiel= d=3D"StandardImage"=20 =09ftTemplateTypeList=3D"dmImage,dmFile,dmNavigation,dmHTML" ftTemplateWebs= kinPrefixList=3D"insertHTML" =09ftTemplateSnippetWebskinPrefix=3D"insertSnippet"> <cfproperty ftSeq=3D"13" ftwizardStep=3D"Body" ftFieldset=3D"Relationshi= ps" name=3D"aObjectIDs" type=3D"array"=20 =09hint=3D"Holds objects to be displayed at this particular node. Can be o= f mixed types." required=3D"no" default=3D""=20 =09ftLabel=3D"Associated Media" ftJoin=3D"dmImage,dmFile,dmFlash" bSyncStat= us=3D"true">
An alternative example where a dedicated image array is bound.
<cfp= roperty ftSeq=3D"12" ftfieldset=3D"Content" ftwizardStep=3D"Overview" name= =3D"description" type=3D"longchar"=20 =09hint=3D"Main body of content." required=3D"no" default=3D"" ftType=3D"ri= chtext" ftLabel=3D"Description"=20 =09ftImageArrayField=3D"aMedia" ftImageTypename=3D"dmImage" ftImageField=3D= "StandardImage" =09ftTemplateTypeList=3D"dmImage" ftTemplateWebskinPrefixList=3D"insertHTML= " =09ftTemplateSnippetWebskinPrefix=3D"insertSnippet"> <cfproperty ftSeq=3D"13" ftfieldset=3D"Content" ftwizardStep=3D"Overview= " name=3D"aMedia" type=3D"array"=20 =09hint=3D"Associated image assets." required=3D"no" default=3D""=20 =09ftLabel=3D"Image Media" ftJoin=3D"dmImage" bSyncStatus=3D"true">
The getConfig function can be extended to provide your project with cust= omisable configuration options. Details of tinyMCE configuration options ar= e availble at: http://wiki.moxiecode.co= m/index.php/TinyMCE:Configuration
See below for a sample extended richtext.cfc You will need to place this= in /farcry/projects/yourprojectname/packages/formtools/richtext.cfc
<cfc= omponent extends=3D"farcry.core.packages.formtools.richtext" name=3D"richte= xt" displayname=3D"Rich Text Editor" hint=3D"Used to liase with longchar ty= pe fields">=20 =09<cffunction name=3D"getConfig" access=3D"public" output=3D"false" ret= urntype=3D"string" hint=3D"This will return the configuration that will be = used by the richtext field"> =09 =09=09<cfset var configJS =3D "" /> =09=09 =09=09<cfsavecontent variable=3D"configJS"> =09=09=09<cfoutput>=09=09=09 =09=09=09=09theme : "advanced", =09=09=09=09plugins : "table,advhr,farcrycontenttemplates,advimage,advlink,= preview,zoom,searchreplace,print,contextmenu,paste,directionality,fullscree= n",=09=09<!--- farcryimage ---> =09=09=09=09theme_advanced_buttons2_add : "separator,farcrycontenttemplates= ", =09=09=09=09theme_advanced_buttons3_add_before : "tablecontrols,separator",= =09=09=09 =09=09=09=09theme_advanced_buttons3_add : "separator,fullscreen,pasteword,p= astetext",=09=09=09=09 =09=09=09=09theme_advanced_toolbar_location : "top", =09=09=09=09theme_advanced_toolbar_align : "left", =09=09=09=09theme_advanced_path_location : "bottom", =09=09=09=09theme_advanced_resize_horizontal : true, =09=09=09=09theme_advanced_resizing : true, =09=09=09=09extended_valid_elements: "textarea[name|class|cols|rows],script= [type],img[style|class|src|border=3D0|alt|title|hspace|vspace|width|height|= align|onmouseover|onmouseout|name]", =09=09=09=09remove_linebreaks : false, =09=09=09=09relative_urls : false =09=09=09</cfoutput> =09=09</cfsavecontent> =09=09 =09=09<cfreturn configJS /> =09</cffunction> </cfcomponent>
external_link_list_url is populated with the contents o= f the site overview tree by default.
The related media content (for example, images, files and html pages) th= at have been configured for the rich text editor will look for the presence= of templates prefixed with "inserthtml" (lowercase is required for case-se= nsitive operating systems). These are little mini templates that can be use= d to insert a special chunk of HTML with properties from the relevant conte= nt type selected.
By default, if there are no "inserthtml" files inside your webskin folde= rs, then you do not see a dropdown under the tab for the relevant content t= ype. Remember, the "@@displayname:" line determines what the user sees in t= he dropdown so make this descriptive and relevant.
<!--= - @@displayname: Image and caption ---> <cfoutput> <p class=3D"featurepic"> <img src=3D"/images/#stObj.imagefile#" alt=3D"#stObj.alt#" /><br /= > #stObj.alt# </p> </cfoutput>
This example uses the F= ncFileSize cflib.org function
<!--= - @@displayname: Full file link ---> <!--- include FncFileSize function here; omitted for brevity ---> <cfif application.config.general.fileDownloadDirectLink eq "false"> <cfset theURL =3D "#application.url.webroot#/download.cfm?DownloadFile= =3D#stObj.ObjectID#"> <cfelse> <cfset theURL =3D "#application.url.webroot#/files/#stObj.filename#"&g= t; </cfif> <cfoutput> <a class=3D"file-#LCase(stObj.fileExt)#" href=3D"#variables.theURL#" tar= get=3D"_blank" title=3D"#stObj.description#">#stObj.title# [#UCase(stObj= .fileExt)# #FncFileSize(stObj.fileSize)#]</a> </cfoutput>