Hi all.
I want to modify the function of ctrl+v by using a plugin.
But in Firefox,It doesn't work well.
Here is the codes.
fckconfig.js:
fckplugin.js:
The problem is when I click ctrl+v,it pastes twice in Firefox.
Maybe the fckeditor has been pasted once before the plugin "FCKPasteKeepFontStyle" was executed,I guess.
Any can tell me the reason?
Or can tell me how to resolve the problem?
Thank you.
I want to modify the function of ctrl+v by using a plugin.
But in Firefox,It doesn't work well.
Here is the codes.
fckconfig.js:
[ CTRL + 86 /*V*/, 'pastekeepfontstyle' ], [ SHIFT + 45 /*INS*/, 'pastekeepfontstyle' ]
fckplugin.js:
FCKPasteKeepFontStyle.prototype.Execute = function() { var clipboardText; if(FCKBrowserInfo.IsIE) { clipboardText = FCK.GetClipboardHTML(); } else { //Get data from FF clipboardText = getClipboardT(); } clipboardText = doSomething(clipboardText); FCK.InsertHtml(clipboardText); }
The problem is when I click ctrl+v,it pastes twice in Firefox.
Maybe the fckeditor has been pasted once before the plugin "FCKPasteKeepFontStyle" was executed,I guess.
Any can tell me the reason?
Or can tell me how to resolve the problem?
Thank you.