Related Categories: Web Dev

I am still using the KTML WYSIWYG editor and some users have mentioned recently that IE7 no longer allows them to upload files via the file browser.  My test computers work just fine so it took a while to find the cause.  Oddly enough my test computers had yet to install Flash 10.

It turns out that Flash 10 (which is great) changed how they allow js to trigger certain things such as opening new window for file browsing.  This has affected a great many sites and tools.  I can't blame Adobe for making the security change, it makes sense to me. However we must have some solution for our customers.

Now to the important part, how to fix KTML:

It turns out I don't care about using flash to upload files. The utility in KTML only works in IE7 anyway which I never use.  So for our case we are just going to disable the flash option completely so the browser performs a normal file upload.

Open /ktm/modules/filebrowser/filebrowser.js

Do a search for 'is.mozilla||version.major<8'.  This js code is shrunk and so hard to read.  The fastest and easiest change for you (not very clean though) is to just change that 8 to 20.  so it would be is.mozilla||version.major<20

Next do another search for 'is.ie&&version.major>=8'  notice the >= this time?  Also change that 8 to 20.

This is telling the editor is to only use the flash module if it is IE and if it Flash is at version 20 or greater.  Since we are at version 10 it will be a very very long time before we hit that mark.

That's it, all should work just fine now (remember to cntr-R to clear js cache of that editor page).  Remember, this is a hack fix.  I could redo the js to be better, but frankly I have more important things to work on at the moment and the compressed code is a pain to work with.  Since KTML is a dead editor anyway I would like to spend my time working on finding a new editor that is supported and better. 

Does such a thing exist?  I can dream can't I?

 


Like this entry? Subscribe to my blog.

Comments (moderation on)

TinyMCE editor is pretty cool, and open source. Might be worth looking into.
# Posted By Bryan | 10/30/08 11:17 AM
I think I will do a new roundup of editors. My issue with tinymce in the past was the lack of file/image browsing and uploading. Since we would replace our existing editor in our cms with a new one we can't degrade existing functionality for our users. FCK editor has significant configuration and CSS issues for me (or had last I tested). XStandard sounds great, but requires plugin install on client machines which is a nostarter for a cms like ours.
# Posted By Joshua Cyr | 10/30/08 11:19 AM
Where is ktm directory located?
# Posted By Janice | 10/31/08 11:12 AM
Thanks soo much for the post. My clients computers stopped working one by one, I was convinced it was another example of stupid end user mistakes. I would NEVER have figured this out.
Thanks again!
-Kevin C.
# Posted By KevinC | 11/18/08 10:16 PM
You might want to take a look at WYSIHAT. It's a new framework for HTML editors that allows you to design the interface yourself. It does all the hard grunt work. It's only v0.1 at the moment and it's just been started but already it's looking good.
# Posted By Brendon | 11/24/08 7:10 PM
Thank you so much, Joshua.
You have saved my day.

Sincerly Robert
# Posted By Robert | 11/26/08 11:20 AM
THANK YOU SO MUCH!!!
# Posted By Terry | 11/27/08 9:34 AM
Thanks so much! Like KevinC, I thought it was the user mistakes until it started happening to me. Never would have known to look there. And certainly wouldn't have thought it was such a simple fix! Thanks again. You've saved me potentially many hours of phone calls with clients about this.
# Posted By Paul | 12/9/08 3:27 PM

Sponsors


Savvy Content Manager