I don't really consider this a formal contribution...but rather, just an explanation on how I managed to get TinyMCE working with my Zen Cart install. It was surprisingly very easy and, aside from the time it took to ftp the TinyMCE files to my server, I had this implemented in about five minutes.
I can't guarantee that it will work for you and, being new to zen cart, I have no business offering any reliable support - but will certainly try if you have problems.
I've used TinyMCE quite a bit for other CMS solutions and it is my preferred open source WYSIWYG editor for clients. If you have no experience with it, you can test drive it from their website.
I liked doing it this way because:
1. It was easy to implement
2. It doesn't remove any original code from the core files - only adds to it
3. It is easy to reverse if it doesn't work
4. TinyMCE rocks over HTMLArea.
What could be problematic:
1. If your client gets a whim to go back into the configuration area and turn HTMLArea back on.
So with that said...here is how I did it:
Step 1: Back-up Database. The excellent backup tool I use is the one contributed by DrByte.
Step 2: Go into your Zen Cart Admin area and turn off HTMLArea in the following areas:
- Configuration > My Store > HTMLArea > Choose Edit > Choose NONE
- Catalog > Categories/Products > Next to the 'Text Editor' drop down in the corner - make sure NONE is selected
- Tools > EZ-Pages > Next to the 'Text Editor' drop down in the corner - make sure NONE is selected
(the last two may be overkill, as I'm not sure if turning it off in the config area overrides those settings - but that is just what I did)
Step 3: Download and Unzip this TinyMCE package which includes the iBrowser Plugin (these instructions are also in that zip file).
Step 4: Upload/FTP the entire tiny_mce folder and generic.css to your admin directory. The generic.css file simply controls how text, links, etc look while you are editing. This has nothing to do with the actual content and won't affect your existing stylesheets. You can modify this however you like. I like using it so my clients are editing in the same style of text as the rest of their site is using.
Step 5: You need to set up a few things for the iBrowser plugin, which allows you to easily upload, insert and manage images directly from the TinyMCE editor window. Although it can be configured to upload to whatever directories you specify within the ibrowser config file, it is currently set to handle two directories: 'images' and 'uploads' (both which need to be located in your zen cart root directory - not the admin directory).
So to make all this happen, you need to set write permissions on a few folders. I had to use 777, but maybe you can get away with 755 or 775.
1. You should already have an images folder in your zen cart root directory. If you don't, create one and Chmod (set permissions) to 777.
2. Create another folder called 'uploads' in your zen cart root directory. Chmod it to 777
3. Browse to the following two folders and Chmod to 777
(note: the 'uploads' and 'images' folders are the ones I like using for the ibrowser tool. If you want to use something different, or add more folders, navigate to the config.inc.php file in tiny_mce\plugins\ibrowser\config\ and edit the directories around line 93. Just make sure that whatever folders you use have the proper write permissions.)
1. Open ezpages.php and product.php from the admin directory.
2. Go to line 207 in ezpages.php or 112 in product.php (or thereabouts) and locate this block code:
If zen cart is installed in your domain root directory:
document_base_url : "http://www.yourname.com/",
If zen cart is installed in a sub-directory on your domain (replace foldername with the sub-direcotry):
document_base_url : "http://www.yourname.com/foldername/",
And that's it. Test it out by going to the admin area and opening one of your EZ pages or by trying to add a new product.
This loads TinyMCE with almost all of the available plugins (which slows the initial page load time). You can configure the editor to only load those plugins you need. You can also customize the toolbar itself (especially nice if you don't want your clients messing with fonts, sizes, etc)....but I don't have the energy to get into how to do all that right now. Instead, feel free to peruse the TinyMCE Website, Forum and User Manual. Their FAQ page is also helpful.
You'll notice the editor pages will be slower to open than they were with HTMLArea....but again, this is partly due to so many plugins being loaded. If it bothers you, you can also search through the TinyMCE forums to some other solutions...one of which is calling to a gzip version of the .js code....but again, that goes beyond these instructions... :)