Common problems of Ewebeditor and their personal use experience

Source: Internet
Author: User
Tags anonymous eval tomcat server

Ewebeditor is a very useful tool and it's nice to meet. is a very popular online editor. Now I'm going to share with you some of the problems and solutions that I have recently used ewebeditor. (here first, I'm using the Flying Fish Modified version of Ewebeditor)

1. On the issue of Ewebeditor incompatible IE8.

Check on the Internet, found that the reason is this, because IE8 shielding the anonymous method so to change to the OnClick method. Modified as follows

Open the Editor.js file under Include, which has this code:

if (element. Yuseronclick) eval (element. Yuseronclick + "anonymous ()");

should be modified into:

1if (Navigator.appVersion.match (/msie (8) \./i)!=null) {
2 if (element). Yuseronclick) eval (element. Yuseronclick + "onclick (event)"); 
3}else{
4 if (element. Yuseronclick) eval (element. Yuseronclick + "anonymous ()");
5}

Find an article on the internet, it said IE7 also think is shielding the anonymous method, after personal testing, IE7 and IE6, no shielding anonymous, it does not need to judge the IE7, but there is a problem, that is IE8 version of the BATE can not be judged, if the high Hands, please.

2. When the content submitted by the editor is empty, the Tomcat server automatically shuts down the problem.

My approach is to:

1function gethtml () {
2 var html;
3 if (beditmode) {
4 html = EWebEditor.document.body.innerHTML ;
5}else{
6 html = eWebEditor.document.body.innerText
7}
8 var re = new RegExp (sbaseurl.re Place (/\//, "\/"), "GI");
9 HTML = html.replace (Re, "");
if ((html.tolowercase () = = "<p>&nbsp;</p>") | | (Html.tolowercase ()

= "<p></p>")) {One
html = ".";
return
html;
14}

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.