# FCKeditor - Sample

<cfoutput>

# FCKEditor - ColdFusion Component (CFC) - Sample 2

This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
ColdFusion is a registered trademark and product of Macromedia, Inc.

</cfoutput> <cfif listFirst( server.coldFusion.productVersion ) LT 6> <cfoutput>
This sample work only with a ColdFusion MX server and higher, because it uses some advantages of this version.</cfoutput> <cfabort> </cfif> <cfscript> // create a pseudo mapping for this demo only! factory = createObject('java','coldfusion.server.ServiceFactory'); mappings = factory.runtimeservice.getMappings(); mappings['/fckeditor2'] = expandPath("../.."); // fckeditor.cfc resides two paths higher than this sample file. // end create a pseudo mapping for this demo only! fckEditor = createObject("component", "/fckeditor2/fckeditor"); fckEditor.instanceName = "myEditor"; fckEditor.value = 'This is some sample text. You are using FCKeditor.'; fckEditor.basePath = "/fckeditor/"; fckEditor.width = "100%"; fckEditor.height = 200; fckEditor.create(); // create the editor. </cfscript> <cfoutput>
</cfoutput> <cfoutput>
</cfoutput>