Copy link to clipboard
Copied
I've noticed a critical bug that I inadvertently posted to production code so I need help! I switched from the built-in FCK editor in <cftextarea> to the newest stand-alone version. It works except it wont POST changes you made to the text, just the initial text when using ColdFusion.Ajax.submitForm(). Each instance name has a unique name but still no help! Attached is how the editor is created within a CFC function
<!--- Create editor instance --->
<cfset var.editorName = "editor" & RandRange(1, 1000000)>
<cfscript>
"var.#var.editorName#" = createObject("component", "FCKEditor.fckeditor");
Evaluate("var.#var.editorName#").instanceName="#ARGUMENTS.name#";
Evaluate("var.#var.editorName#").basePath="/editor/";
Evaluate("var.#var.editorName#").value="#ARGUMENTS.value#";
Evaluate("var.#var.editorName#").width="#ARGUMENTS.width#";
Evaluate("var.#var.editorName#").height="#ARGUMENTS.height#";
if (ARGUMENTS.toolbar NEQ "") {
Evaluate("var.#var.editorName#").toolbarSet="#ARGUMENTS.toolbar#";
}
Evaluate("var.#var.editorName#").create();
</cfscript>
Copy link to clipboard
Copied
Figured it out..... FCK generates a hidden field that is updated on submit, since I'm not actually doing a traditional POST, its not updating the field, you need to integrate this function before you do the submit to update the data.........
FCKeditorAPI.GetInstance('myInstance').UpdateLinkedField();