Hi,
I'm trying to incorporate FCK into a CFbased content management system. I can call the editor without any problem and can also retrive content from the CMS database. However, I'm having difficulty inserting the edited content from the FCK iframe into the db.
Is there a particular variable I should reference to access the edited content?
Thanks very much for any help.
Cheers, Chris B.
I'm trying to incorporate FCK into a CFbased content management system. I can call the editor without any problem and can also retrive content from the CMS database. However, I'm having difficulty inserting the edited content from the FCK iframe into the db.
Is there a particular variable I should reference to access the edited content?
Thanks very much for any help.
Cheers, Chris B.
RE: ColdFusion - trouble updating content in db
I call fckeditor with this syntax:
<cfmodule template="fckeditor/fckeditor.cfm" instanceName="i_text" width="580" height="500" toolbarSetName="" canUpload="" canBrowse="" FCKeditorBasePath="fckeditor/" initialValue="#qContent.i_text#">
... where qContent is the query and i_text is the database field.
In instanceName, you define the name of the form variable. In the processing script, you've got the variable form.i_text in this case.
hth,
Markus
RE: ColdFusion - trouble updating content in db
I've been looking at the code in fckeditor.cfm and it appears that the initial content value is being passed back using a hidden form field. Is there any particular variable I should be using to capture the output of the editor?
Many thanks for your help.
Chris
RE: ColdFusion - trouble updating content in db
Hi Chris,

as I wrote, you get a variable named #form.instancename# (in my case, #form.i_text#) on the processing page - you can insert this into your db.
You don't have to care for anything else like hidden fields etc. - FCK does this for you!
Markus
RE: ColdFusion - trouble updating content in db
I think I see the problem now ...
Our code expects to use the iframe "id=#instancename#" to process the content. fckeditor.cfm prepends "iframe_" to the "#instancename#" to create the id. Without the "iframe_" prefix in the id, FCK doesn't seem to function. With the "iframe_" prefix, our code doesn't recognize the id and doesn't function. We use the id to differentiate between multiple editors on the same editing page, but just using the instancename alone.
I'll change our code conditionally for FCK implementations. We're trying to support many different editors.
Thanks very much for your help.
Chris
RE: ColdFusion - trouble updating content in db
I got it working using the #form.instancename# variable, as you described.
Thanks a lot for your help.
Chris