Solution to the lack of objects in editor. js (used by ewebeditor)

Source: Internet
Author: User

The IE browser is upgraded to ie8.0. When an error occurs when using the ewebeditor online HTML text editor, it is useless to click all the edit buttons on the ewebeditor. Only the error words on the webpage are displayed in the lower-left corner of the browser status bar. It seems that ewebeditor is really fragile. First, it is full of loopholes, Firefox does not support it, and IE8 does not support it now. It is really depressing. But fortunately, after research, the problem was finally solved.

1. The solution to the problem that IE8 does not support the ewebeditor online text editor is as follows:
1. First find the directory where the ewebeditor is located, and then search for the editor. JS file, because ewebeditor has many versions, so editor. the directories of JS files are also different. Some may be under the include directory, and some may be under the JS directory.
2. Open the editor. js file in notepad and find the following Code :
If (element. yuseronclick ){
Eval (element. yuseronclick + "anonymous ()");
}
Due to the different versions of the ewebeditor Editor, some may not find the above Code, but the following code. The two types of code only have different writing formats and have the same meaning:
If (element. yuseronclick) eval (element. yuseronclick + "anonymous ()");

3. Replace the above Code with the following code:
If (navigator. appversion. Match (/8./I) = '8 .')
{
If (element. yuseronclick) eval (element. yuseronclick + "onclick (event )");
}
Else
{
If (element. yuseronclick) eval (element. yuseronclick + "anonymous ()");
}
In addition, this method is reprinted on the Internet. It is feasible for me to use the above method to modify a few items. On behalf of the ewebeidtor team, I would like to thank the original author. In any case, IE8 is really hard to use TMD. When I was playing with the black upload, the packet capture tool could not catch the data under IE8, and I still had ie errors on my computer. Fuck nnd!

2. If IE7 does not support this function, add the following code:
If (navigator. appversion. match (/8. /I) = '8. '| navigator. appversion. match (/7. /I) = '7. '){
If (element. yuseronclick) eval (element. yuseronclick + "onclick (event)"); // IE8 or IE7
} Else {
If (element. yuseronclick) eval (element. yuseronclick + "anonymous ()"); // IE6
}

3. What if Maxthon does not support maxcompute? Then you can continue to look at it:
If (navigator. appversion. Match (/8./I) = '8. '| navigator. appversion. Match (/Maxthon/I) = 'maxthon '){
If (element. yuseronclick) eval (element. yuseronclick + "onclick (event )");
} Else {
If (element. yuseronclick) eval (element. yuseronclick + "anonymous ()");

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.