It's quite easy to get the admin entries editor to use tinyMCE. All you have to do is edit the textArea.cfm file which is found in /blog/tags/.
Updating the editor page
Add this code to the textArea.cfm page (just beneith the output tag)
<cfsavecontent variable="request.tinyMCE">
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="#application.rooturl#/includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom"
});
</script>
<!-- /tinyMCE -->
</cfsavecontent>
<cfhtmlhead text="#request.tinyMCE#" />
As the tinyMCS javascript needs to be in the header of the page we save the JS content to a variable called request.tinyMCE using cfsavecontent - we then post this to the header of the page using coldfusions cfhtmlhead tag.
Setting up tinyMCE - As easy as 1,2,3
1. Create a folder called 'tinymce' in the /includes/ folder (/blog/includes/)
2. Copy the jscripts folder (from your
tinyMCE download) into the includes folder so you should have this structure /blog/includes/tinymce/jscripts/
3. Test - go into your admin area, click add entry watch it load.
You can call this textArea.cfm from the page.cfm and textblock.cfm
<cfmodule template="../tags/textarea.cfm" fieldname="body" value="#htmlEditFormat(form.body)#" class="txtArea">
Remember to brake out of the cfoutput when calling this module.
What is TinyMCE
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.