No I am not mad.
In fact, quite happy to have easily added the very versatile FCKeditor to my Blog.
- This means I can create HTML layouts right here. Here is a simple bulleted list
- This is bold
- This is Italic
FCK has lots more features but I limited mine for simplicity's sake.
Here is how I did it...
Adding FCK to Blog.cfc
This was actually pretty easy, because I already have FCK setup in my CF cms.
The file to modify in the blog.cfc is called textarea.cfm. Ray even has some witty comments for you about where to put your RTE code (and I think I saw instructions for TinyMCE on the blog.cfc forum)
Anyway... I opened that file, commented out Ray's code
<!--- <textarea name="#attributes.fieldname#" id="#attributes.fieldname#" <cfif len(attributes.class)>class="#attributes.class#"</cfif>>#attributes.value#</textarea> --->
and entered this code from my CMS
<!--- [Start] MRE Edit : Add text area --->
<cfset fckBasePath = "/admin/fckeditor/">
<cfset request.FCKeditor = StructNew()>
<cfset request.FCKeditor.userFilesPath = "/admin/FCKFiles/">
basePath = "#fckBasePath#";
fckEditor = createObject("component", "#basePath#fckeditor");
fckEditor.instanceName = "#attributes.fieldname#";
fckEditor.value = '#attributes.value#';
fckEditor.basePath = basePath;
fckEditor.width = 420;
fckEditor.height = 280;
fckeditor.toolbarset = 'MREbasic';
// toolbar names : MREbasic, basic, default, wiki, forum
fckEditor.create(); // create the editor.
<!--- [END] MRE Edit : Add text area --->
As you can see, if you were working with a default setup of FCK, you would put the cfscript in right from the FCK supplied code. I just have a few more variables in mind, so I left it that way. And I put the variables in place from Ray's default textarea for the "instanceName" and "value"... easy.
The other step was to simply copy the FCKeditor directory into the blog's 'admin' folder, and upload everything.
To control which tools are shown for FCK, you want the "fckconfig.js" in the FCKeditor directory.
I haven't put FCK in for comments yet, but I have it in place for "pages" in the blog admin. Hey... look... its a full page cms!!