I love tinyMCE but because I use ColdFusion I've not been able to use the built image browser. The API provides the hooks required to roll your own so I figured someone else might have done the heavy lifting and sure enough, I found a CF based image browser plugin.
- At the time of writing the JavaScript function OpenFile in index.cfm doesn't trigger the onChange property for the imageURL field (at least in my browser) so I had to manually add the line
srcWin.ImageDialog.showPreviewImage(fileUrl);
before the window.close()
line. This manually calls the showPreviewImage function that sets the image dimensions, otherwise your image will be added with a height and width of 0px!
- If you are using BlogCFC v5.9.1.001, you'll need to manually comment out the image browser library since the setting for turning off the file browser didn't seem to work for me.
- Check to see that you don't already have a an option specified in the tinyMCE.init() code block - mine was set to the PHP based plugin that comes bundled for advimage. Simply replace that value with the line in step 3 of Doug's instructions.
Overall, great experience with the plugin once I realized I was looking at the wrong tinyMCE.init block and kudos for Doug for a job well done!