The phpnew blog has a built-in discuz ubb-type editor. The editor function is inserted at the cursor, which can be inaccurate on ie11.
I analyzed it today and finally found the reason. The browser of the old version of js file has an exception, so the insertion point has been in the head. I fixed it today.
Provides a js function. Returns an array.
The code copy is as follows:
function sys_userAgent(){
var userAgent = navigator.userAgent,
rMsie = /(msie/s|trident.*rv:)([/w.]+)/,
rFirefox = /(firefox)//([/w.]+)/,
rOpera = /(opera).+version//([/w.]+)/,
rChrome = /(chrome)//([/w.]+)/,
rSafari = /version//([/w.]+).*(safari)/;
var browser,version,ua;
ua = userAgent.toLowerCase();
var match = rMsie.exec(ua);
if (match != null) {
return { browser : "ie", version : match[2] || "0" };
}
if (!!window.ActiveXObject || "ActiveXObject" in window){
return { browser : "ie", version : "0"};
}
var match = rFirefox.exec(ua);
if (match != null) {
return { browser : "firefox", version : match[2] || "0" };
}
var match = rOpera.exec(ua);
if (match != null) {
return { browser : "opera", version : match[2] || "0" };
}
var match = rChrome.exec(ua);
if (match != null) {
return { browser : "chrome", version : match[2] || "0" };
}
var match = rSafari.exec(ua);
if (match != null) {
return { browser : "safari", version : match[1] || "0" };
}
if (match != null) {
return { browser : "", version : "0" };
}
}
Hope it will be helpful to everyone.
The editor modified contents also fix the problem that attachment flash loads often fail, and the carriage return problem is handled.