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> </p>") | | (Html.tolowercase ()
= "<p></p>")) {One
html = ".";
return
html;
14}