The example in this article describes the way that pop-up windows are canceled when FCKeditor paste word. Share to everyone for your reference. The specific methods are as follows:
Use FCKeditor as a user-published edit box to allow users to publish word. By default, when you glue to Word, you are prompted to clear the word style, select Yes to pop up a box, and you need to paste it again to clear the word style. This operation is cumbersome, so cancel.
The first way to find it is to put the fckeditorcode_ie.js under the ckeditor/"target=" _blank >fckeditoreditorjs, and find the following pastefromword:
Copy Code code as follows:
Pastefromword:function () {fckdialog.opendialog (' fckdialog_paste ', Fcklang.pastefromword, ' dialog/fck_paste.html '), 400,330, ' Word ');
Change it to
Copy Code code as follows:
Pastefromword:function () {FCK. Inserthtml (Clipboarddata.getdata ("Text"));}
But in this way, it becomes plain text, no!
Then we found some solutions:
Because JS what will automatically cache, each test, but also to clear the temporary files and then refresh the page to do, really trouble ah!
The specific actions are as follows:
Open the Fckeditorcode_ie.js under the Fckeditoreditorjs,
Found it
Copy Code code as follows:
if (Confirm (fcklang.pastewordconfirm))
The article, instead:
Copy Code code as follows:
if (Confirm (fcklang.pastewordconfirm)) {var d=a;d=cleanword (d,true,true); FCK. Inserthtml (D); return false;}
Open the dialogfck_paste.html and paste the Cleanword function inside the head.
When you paste word again, when you select Yes, it clears the formatting directly. If not to whether the hint, the confirm (fcklang.pastewordconfirm) of the judgment can be removed.
I hope this article will help you with your JavaScript programming.