First of all, I wanted to try to provide what I discovered so perhaps an improvement could be added so others did not have to re-figure out what I figured out. Secondly, I am aware that this "problem" probably only affects a very few people in a certain kind of environment. Third, a work around would be greatly appreciated.
In our production environment the the "Paste via script" is disabled (Tools>Internet Options>Security>Custom Level or whatever, scroll down to near the bottom). This is a manditory setting over which I have no control. The freetextbox I created has PasteMode set to Text in order to strip out Word formatting and whatnot. What I found out is that the FTB-FreeTextBox.js code that handles the cleanup (around line 465 of so) is checking to see if the browser has the window.clipboardData object (which IE 6 does), but it is not checking if pasting from a script is available, which it is not when it is disabled. The result is that I get a javascript error and the browser allows pasting as if the pastemode were not set.
It would be nice if code were included to check if the freetextbox were enabled as well, to alert the developer of what is going on.
So rather than:
if(window.clipboardData){
//work
}else{
alert('Your browser does not support rich text pasting');
}
Maybe do this:
if(typeOf clipboardData == 'undefined'){
alert('Your browser does not support rich text pasting');
}else if(clipboardData.getData('Text') == 'undefined'){
alert('Your browser is set to block scripted pasting');
}else{
//do work
}
Again, is there a work around to strip HTML on pasting that aviod hitting the "Paste via scripting" wall? I know I can strip on the backend, but the requirement is for it to be stripped on the front-end and the IE setting is not going to be enabled.
Thanks!! Great product by the way. I was all stoked to use it until I got into Production and hit this wall. Good work just the same.