📄 _editor_0js__jsp.java
字号:
return true;
for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
com.caucho.vfs.Dependency depend;
depend = (com.caucho.vfs.Dependency) _caucho_depends.get(i);
if (depend.isModified())
return true;
}
return false;
}
public long _caucho_lastModified()
{
return 0;
}
public java.util.HashMap<String,java.lang.reflect.Method> _caucho_getFunctionMap()
{
return _jsp_functionMap;
}
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
com.caucho.server.webapp.WebApp webApp
= (com.caucho.server.webapp.WebApp) config.getServletContext();
com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
manager.addTaglibFunctions(_jsp_functionMap, "editor_js_lt", "/WEB-INF/tlds/LabelTag.tld");}
public void destroy()
{
_caucho_isDead = true;
super.destroy();
}
public void init(com.caucho.vfs.Path appDir)
throws javax.servlet.ServletException
{
com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome();
com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
mergePath.addMergePath(appDir);
mergePath.addMergePath(resinHome);
com.caucho.loader.DynamicClassLoader loader;
loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
String resourcePath = loader.getResourcePathSpecificFirst();
mergePath.addClassPath(resourcePath);
com.caucho.vfs.Depend depend;
depend = new com.caucho.vfs.Depend(appDir.lookup("editor_full/editor_js.jsp"), 5807878062798286579L, false);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
depend = new com.caucho.vfs.Depend(appDir.lookup("WEB-INF/tlds/LabelTag.tld"), 936435632544814250L, false);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, new com.caucho.make.ClassDependency(com.redmoon.forum.ui.LabelTag.class, -398364840801018274L));
}
static {
try {
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
private final static char []_jsp_string1;
private final static char []_jsp_string2;
private final static char []_jsp_string0;
static {
_jsp_string1 = "\");\r\n IframeID.focus();\r\n return false;\r\n}\r\n\r\nfunction cws_CleanCode()\r\n{\r\n var editor=IframeID;\r\n editor.focus();\r\n if (cws_bIsIE5){\r\n // 0bject based cleaning\r\n var body = editor.document.body;\r\n for (var index = 0; index < body.all.length; index++) {\r\n tag = body.all[index];\r\n //*if (tag.Attribute[\"className\"].indexOf(\"mso\") > -1)\r\n tag.removeAttribute(\"className\",\"\",0);\r\n tag.removeAttribute(\"style\",\"\",0);\r\n }\r\n // Regex based cleaning\r\n var html = editor.document.body.innerHTML;\r\n html = html.replace(/\\<p>/gi,\"[$p]\");\r\n html = html.replace(/\\<\\/p>/gi,\"[$\\/p]\");\r\n html = html.replace(/\\<br>/gi,\"[$br]\");\r\n html = html.replace(/\\<[^>]*>/g,\"\"); ///\u8fc7\u6ee4\u5176\u5b83\u6240\u6709\"<...>\"\u6807\u7b7e\r\n html = html.replace(/\\[\\$p\\]/gi,\"<p>\");\r\n html = html.replace(/\\[\\$\\/p\\]/gi,\"<\\/p>\");\r\n html = html.replace(/\\[\\$br\\]/gi,\"<br>\");\r\n editor.document.body.innerHTML = html;\r\n }else\r\n {\r\n var html = IframeID.document.body.ownerDocument.createRange();\r\n html.selectNodeContents(IframeID.document.body);\r\n IframeID.document.body.innerHTML = html.toString();\r\n }\r\n}\r\n\r\nfunction cws_ChekEmptyCode(html)\r\n{\r\n html = html.replace(/\\<[^>]*>/g,\"\"); ///\u8fc7\u6ee4\u5176\u5b83\u6240\u6709\"<...>\"\u6807\u7b7e\r\n html = html.replace(/ /gi, \"\");\r\n html = html.replace(/o:/gi, \"\");\r\n html = html.replace(/\\s/gi, \"\");\r\n return html;\r\n}\r\n\r\nvar colour\r\nfunction FormatText(command, option)\r\n{\r\nvar codewrite\r\nif (cws_bIsIE5){\r\n if (option==\"removeFormat\"){\r\n command=option;\r\n option=null;}\r\n IframeID.focus();\r\n IframeID.document.execCommand(command, false, option);\r\n cws_pureText = false;\r\n IframeID.focus();\r\n \r\n}else{\r\n if ((command == 'forecolor') || (command == 'backcolor')) {\r\n parent.command = command;\r\n buttonElement = document.getElementById(command);\r\n IframeID.focus();\r\n document.getElementById(\"colourPalette\").style.left = getOffsetLeft(buttonElement) + \"px\";\r\n document.getElementById(\"colourPalette\").style.top = (getOffsetTop(buttonElement) + buttonElement.offsetHeight) + \"px\";\r\n \r\n if (document.getElementById(\"colourPalette\").style.visibility==\"hidden\")\r\n {document.getElementById(\"colourPalette\").style.visibility=\"visible\";\r\n }else {\r\n document.getElementById(\"colourPalette\").style.visibility=\"hidden\";\r\n }\r\n \r\n //get current selected range\r\n var sel = IframeID.document.selection; \r\n if (sel != null) {\r\n colour = sel.createRange();\r\n }\r\n }\r\n else{\r\n IframeID.focus();\r\n IframeID.document.execCommand(command, false, option);\r\n cws_pureText = false;\r\n IframeID.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction setColor(color)\r\n{\r\n IframeID.focus();\r\n IframeID.document.execCommand(parent.command, false, color);\r\n IframeID.focus();\r\n document.getElementById(\"colourPalette\").style.visibility=\"hidden\";\r\n}\r\n\r\n//----------------\r\nfunction cws_FilterScript(content)\r\n{\r\n content = cws_rCode(content, 'javascript:', '<b>javascript</b> :');\r\n var RegExp = /<script[^>]*>(.*)<\\/script>/gi;\r\n content = content.replace(RegExp, \"".toCharArray();
_jsp_string2 = "\");\r\n RegExp = /<P> <\\/P>/gi;\r\n content = content.replace(RegExp, \"\");\r\n return content;\r\n}\r\n\r\nfunction cws_rCode(s,a,b,i){\r\n //s\u539f\u5b57\u4e32\uff0ca\u8981\u6362\u6389pattern\uff0cb\u6362\u6210\u5b57\u4e32\uff0ci\u662f\u5426\u533a\u5206\u5927\u5c0f\u5199\r\n a = a.replace(\"?\",\"\\\\?\");\r\n if (i==null)\r\n {\r\n var r = new RegExp(a,\"gi\");\r\n }else if (i) {\r\n var r = new RegExp(a,\"g\");\r\n }\r\n else{\r\n var r = new RegExp(a,\"gi\");\r\n }\r\n return s.replace(r,b); \r\n}\r\n\r\n// \u56de\u590d\u53ef\u89c1\r\nfunction replyCanSee(){\r\n var fontbegin = \"[REPLY]\";\r\n var fontend = \"[/REPLY]\";\r\n if ((IframeID.document.selection)&&(IframeID.document.selection.type == \"Text\")) {\r\n var range = IframeID.document.selection.createRange();\r\n var ch_text = range.text;\r\n range.text = fontbegin + ch_text + fontend;\r\n }\r\n else {\r\n IframeID.document.body.innerHTML=fontbegin+IframeID.document.body.innerHTML+fontend;\r\n }\r\n}\r\n\r\nfunction canSee(moneyCode) {\r\n var FoundErrors = '';\r\n var enterpoints = prompt(text_enter_points,\"1000\");\r\n if (!enterpoints) {\r\n FoundErrors += \"\\n\" + error_no_points;\r\n }\r\n if (FoundErrors) {\r\n alert(\"Error:\" + FoundErrors);\r\n return;\r\n }\r\n\r\n var fontbegin = \"[HIDE=\" + moneyCode + \",\"+enterpoints+\"]\";\r\n var fontend = \"[/HIDE]\";\r\n if ((IframeID.document.selection)&&(IframeID.document.selection.type == \"Text\")) {\r\n var range = IframeID.document.selection.createRange();\r\n var ch_text = range.text;\r\n range.text = fontbegin + ch_text + fontend;\r\n }\r\n else {\r\n IframeID.document.body.innerHTML=fontbegin+IframeID.document.body.innerHTML+fontend;\r\n }\r\n}\r\n\r\nfunction usePoint() {\r\n var ary = showModalDialog('point_sel.jsp',window.self,'dialogWidth:526px;dialogHeight:435px;status:no;help:no;');\r\n if (ary==null)\r\n return;\r\n \r\n var fontbegin = \"[point=\" + ary[0] + \",\" + ary[1] + \"]\";\r\n var fontend = \"[/point]\";\r\n if ((IframeID.document.selection)&&(IframeID.document.selection.type == \"Text\")) {\r\n var range = IframeID.document.selection.createRange();\r\n var ch_text = range.text;\r\n range.text = fontbegin + ch_text + fontend;\r\n }\r\n else {\r\n IframeID.document.body.innerHTML=fontbegin+IframeID.document.body.innerHTML+fontend;\r\n }\r\n}\r\n\r\nfunction payme() {\r\n var ary = showModalDialog('point_sel.jsp',window.self,'dialogWidth:526px;dialogHeight:435px;status:no;help:no;');\r\n if (ary==null)\r\n return;\r\n \r\n var fontbegin = \"[payme=\" + ary[0] + \",\" + ary[1] + \"]\";\r\n var fontend = \"[/payme]\";\r\n if ((IframeID.document.selection)&&(IframeID.document.selection.type == \"Text\")) {\r\n var range = IframeID.document.selection.createRange();\r\n var ch_text = range.text;\r\n range.text = fontbegin + ch_text + fontend;\r\n }\r\n else {\r\n IframeID.document.body.innerHTML=fontbegin+IframeID.document.body.innerHTML+fontend;\r\n }\r\n}\r\n//cws_InitDocument(\"Body\",\"GB2312\");".toCharArray();
_jsp_string0 = "\r\n\r\nvar cws_edit; //selectRang\r\nvar cws_RangeType;\r\nvar cws_selection;\r\nvar cws_filterScript = true; // false;\r\nvar cws_charset=\"UTF-8\";\r\nvar cws_bLoad=false\r\nvar cws_pureText=true\r\nvar cws_bTextMode=1 // \u9ed8\u8ba4\u4e3aDesign\u6a21\u5f0f\r\n\r\n// \u9884\u89c8\r\nfunction cws_InitDocument(hiddenid, charset)\r\n{ \r\n if (charset!=null)\r\n cws_charset=charset;\r\n //if (cws_bIsIE5){\r\n //var cws_bodyTag=\"<style type=text/css>.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3 }\\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\\nbody{boder:0px}</style></head><BODY bgcolor=\\\"#FFFFFF\\\" title=\\\"Ctrl+Enter\u76f4\u63a5\u63d0\u4ea4\u8d34\u5b50\\\" onkeydown=\\\"ctlent();\\\">\";\r\n //}else\r\n //{\r\n var cws_bodyTag=\"<style type=text/css>.quote{border: thin dashed;}\\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\\nbody{boder:0px}</style></head><BODY bgcolor=\\\"#FFFFFF\\\">\";\r\n //}\r\n \r\n if (navigator.appVersion.indexOf(\"MSIE 6.0\",0)==-1){\r\n IframeID.document.designMode=\"On\"\r\n }\r\n IframeID.document.open();\r\n IframeID.document.write ('<html><head>');\r\n if (cws_bIsIE5){\r\n IframeID.document.write ('<script language=\"javascript\">');\r\n IframeID.document.write ('var ispost=0;');\r\n IframeID.document.write (' function ctlent(eventobject)');\r\n IframeID.document.write (' {');\r\n IframeID.document.write (' if(event.ctrlKey && window.event.keyCode==13&&ispost==0)');\r\n IframeID.document.write (' {');\r\n IframeID.document.write (' ispost=1;');\r\n IframeID.document.write (' parent.cws_CopyData(\"'+hiddenid+'\"); ');\r\n IframeID.document.write (' parent.document.ob_form.Submit.disabled=true;');\r\n IframeID.document.write (' parent.document.ob_form.Submit2.disabled=true;');\r\n IframeID.document.write (' parent.document.ob_form.submit();');\r\n IframeID.document.write (' }');\r\n IframeID.document.write (' }');\r\n IframeID.document.write ('<\\/script>');\r\n }\r\n IframeID.document.write(cws_bodyTag);\r\n IframeID.document.write(\"</body>\");\r\n IframeID.document.write(\"</html>\");\r\n IframeID.document.close();\r\n IframeID.document.body.contentEditable = \"True\";\r\n IframeID.document.charset=cws_charset;\r\n cws_bLoad=true;\r\n cws_setStyle();\r\n //IframeID.focus();\r\n}\r\n\r\nfunction cws_setMode(n)\r\n{\r\n cws_setStyle();\r\n var cont;\r\n var cws_Toolbar0=document.getElementById(\"ExtToolbar0\");\r\n var cws_Toolbar1=document.getElementById(\"ExtToolbar1\");\r\n var cws_Toolbar2=document.getElementById(\"ExtToolbar2\");\r\n switch (n){\r\n case 1:\r\n cws_Toolbar0.style.display=\"\";\r\n cws_Toolbar1.style.display=\"\";\r\n cws_Toolbar2.style.display=\"\";\r\n if (document.getElementById(\"cws_TabHtml\").className==\"cws_TabOn\"){\r\n if (cws_bIsIE5){\r\n cont=IframeID.document.body.innerText;\r\n cont=cws_correctUrl(cont);\r\n if (cws_filterScript)\r\n cont=cws_FilterScript(cont);\r\n IframeID.document.body.innerHTML=\"<a>\u3000</a>\"+cont;\r\n //IframeID.document.body.innerHTML=cws_correctUrl(IframeID.document.body.innerHTML);\r\n }else{\r\n var html = IframeID.document.body.ownerDocument.createRange();\r\n html.selectNodeContents(IframeID.document.body);\r\n IframeID.document.body.innerHTML = html.toString();\r\n }\r\n }\r\n break;\r\n case 2:\r\n if (canusehtml==\"1\" || canusehtml==\"3\"){\r\n cws_Toolbar0.style.display=\"none\"; //\u5173\u95ed\u5de5\u5177\u680f\r\n cws_Toolbar1.style.display=\"none\";\r\n cws_Toolbar2.style.display=\"none\";\r\n cws_cleanHtml();\r\n cont=IframeID.document.body.innerHTML;\r\n cont=cws_rCode(IframeID.document.body.innerHTML,\"<a>\u3000</a>\",\"\");\r\n cont=cws_correctUrl(cont);\r\n if (cws_filterScript){cont=cws_FilterScript(cont);}\r\n if (cws_bIsIE5){ //IE\r\n IframeID.document.body.innerText=cont;\r\n }else{ //Nc\r\n var html=document.createTextNode(cont);\r\n IframeID.document.body.innerHTML = \"\";\r\n IframeID.document.body.appendChild(html);\r\n }\r\n }else{\r\n alert(\"You cann't use this function.\"); // \"\u60a8\u4e0d\u80fd\u4f7f\u7528\u8fd9\u4e2a\u529f\u80fd!\")\r\n }\r\n break;\r\n\r\n case 3:\r\n cws_Toolbar0.style.display=\"\";\r\n cws_Toolbar1.style.display=\"none\";\r\n cws_Toolbar2.style.display=\"none\";\r\n var mhtml=document.getElementById(\"cws_TabHtml\");\r\n var mdesign=document.getElementById(\"cws_TabDesign\");\r\n if (mhtml.className==\"cws_TabOn\")\r\n {\r\n if (cws_bIsIE5){\r\n cont=IframeID.document.body.innerText;\r\n cont=cws_correctUrl(cont);\r\n if (cws_filterScript)\r\n cont=cws_FilterScript(cont);\r\n IframeID.document.body.innerHTML=cont;\r\n }else{\r\n var html = IframeID.document.body.ownerDocument.createRange();\r\n html.selectNodeContents(IframeID.document.body);\r\n IframeID.document.body.innerHTML = html.toString();\r\n }\r\n }\r\n break;\r\n }\r\n cws_setTab(n);\r\n cws_bTextMode=n\r\n}\r\n\r\nfunction cws_setTab(n)\r\n{\r\n //html\u548cdesign\u6309\u94ae\u7684\u6837\u5f0f\u66f4\u6539\r\n var mhtml=document.getElementById(\"cws_TabHtml\");\r\n var mdesign=document.getElementById(\"cws_TabDesign\");\r\n if (n==1)\r\n {\r\n mhtml.className=\"cws_TabOff\";\r\n mdesign.className=\"cws_TabOn\"; \r\n }\r\n else if (n==2)\r\n {\r\n mhtml.className=\"cws_TabOn\";\r\n mdesign.className=\"cws_TabOff\";\r\n }\r\n else if (n==3)\r\n {\r\n mhtml.className=\"cws_TabOff\";\r\n mdesign.className=\"cws_TabOff\";\r\n }\r\n}\r\n\r\nfunction cws_setStyle()\r\n{\r\n //var bs = IframeID.document.body.runtimeStyle;\r\n var bs = IframeID.document.body.style;\r\n //\u6839\u636emode\u8bbe\u7f6eiframe\u6837\u5f0f\u8868 \r\n if (cws_bTextMode==2) {\r\n bs.fontFamily=\"Arial\";\r\n bs.fontSize=\"10pt\";\r\n }else{\r\n bs.fontFamily=\"Arial\";\r\n bs.fontSize=\"10.5pt\";\r\n }\r\n bs.scrollbar3dLightColor= '#D4D0C8';\r\n bs.scrollbarArrowColor= '#000000';\r\n bs.scrollbarBaseColor= '#D4D0C8';\r\n bs.scrollbarDarkShadowColor= '#D4D0C8';\r\n bs.scrollbarFaceColor= '#D4D0C8';\r\n bs.scrollbarHighlightColor= '#808080';\r\n bs.scrollbarShadowColor= '#808080';\r\n bs.scrollbarTrackColor= '#D4D0C8';\r\n bs.border='0';\r\n}\r\n\r\nfunction cws_validateMode()\r\n{\r\n if (cws_bTextMode!=2) return true;\r\n alert(\"".toCharArray();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -