So, you force to use on every OnPaste event the FCK.Paste function.
On line 17 modify the FCK.Paste function. You have to modify the last "else return true;" to "else {FCK.CleanAndPaste(sHTML); return true;}".
In this way you force every paste event to go throught the CleanAndPaste function (if ForcePasteAsPlainText is set to paste). After that, you can modify the CleanAndPaste function as you wish.
Don't forget to make the same changes in the fckeditorcode_gecko_2.js file to get it working in other browser too.
I did it. I did also on "fckconfig.js" set FCKConfig.ForcePasteAsPlainText = true ; but if I paste html text on editor it mantain font, h1, h2, h3 and all other format tags.
RE: How to clean HTML on normal paste?
I think you can do it on the next way:
File fckeditorcode_ie_2.js line 56. Modify
"if (FCKConfig.ForcePasteAsPlainText) FCK.Events.AttachEvent("OnPaste",FCK.Paste);"
to
"FCK.Events.AttachEvent("OnPaste",FCK.Paste);"
So, you force to use on every OnPaste event the FCK.Paste function.
On line 17 modify the FCK.Paste function. You have to modify the last "else return true;" to "else {FCK.CleanAndPaste(sHTML); return true;}".
In this way you force every paste event to go throught the CleanAndPaste function (if ForcePasteAsPlainText is set to paste). After that, you can modify the CleanAndPaste function as you wish.
Don't forget to make the same changes in the fckeditorcode_gecko_2.js file to get it working in other browser too.
Best regards,
Jos Benigno
RE: How to clean HTML on normal paste?
I did also on "fckconfig.js" set FCKConfig.ForcePasteAsPlainText = true ;
but if I paste html text on editor it mantain font, h1, h2, h3 and all other format tags.
Thanks