eWebEditor.jsp
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:7k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%
  2. /** 名称:eWebEditor在线文本编辑器--飞鱼修改版
  3. *   作者:飞鱼
  4. *  日期:2004.11.30
  5. *   网址:http://www.fiyu.net
  6. */
  7. %>
  8. <%@ page contentType="text/html; charset=GBK" %>
  9. <%@ page import="net.fiyu.edit.EditWebhelper,net.fiyu.edit.EditBean"%>
  10. <%
  11. String  sContentID,
  12.          sStyleID,
  13.          sFullScreen,
  14.          sStyleName,
  15.                sStyleDir,
  16.              sStyleCSS,
  17.                sStyleUploadDir,
  18.                nStateFlag,
  19.                sDetectFromWord,
  20.                sInitMode,
  21.                sBaseUrl,
  22.                sVersion,
  23.                sReleaseDate,
  24. sAutoRemote,
  25.                sToolBar;
  26. EditWebhelper web = new EditWebhelper();
  27. //初始化处理bean
  28. web.filename = config.getServletContext().getRealPath("/")+"WEB-INF/style.xml";
  29. web.filename2 = config.getServletContext().getRealPath("/")+"WEB-INF/button.xml";
  30. web.getInstance();
  31. //初始化输出bean
  32. EditBean bean = web.InitPara();
  33. sVersion = bean.getSVersion();
  34. sReleaseDate = bean.getSReleaseDate();
  35. sStyleName = bean.getSStyleName();
  36. sStyleDir = bean.getSStyleDir();
  37. sStyleUploadDir = bean.getSStyleUploadDir();
  38. sInitMode = bean.getSInitMode();
  39. sDetectFromWord = bean.getSDetectFromWord();
  40. sBaseUrl = bean.getSBaseUrl();
  41. sAutoRemote = bean.getSAutoRemote();
  42. sToolBar = bean.getSToolBar();
  43. nStateFlag = bean.getNStateFlag();
  44. //设置颜色样式
  45. sStyleCSS = request.getParameter("color");
  46.                 if (sStyleCSS == null)
  47.                  sStyleCSS = "blue";
  48.                 else
  49.                 sStyleCSS = request.getParameter("color").trim();
  50.                 //设置全屏幕选项
  51.                 sFullScreen = request.getParameter("fullscreen");
  52.                 if (sFullScreen == null)
  53.                  sFullScreen = "0";
  54.                 else
  55.                 sFullScreen = request.getParameter("fullscreen").trim();
  56.                 //设置内容选项
  57.                 sContentID = request.getParameter("id");
  58.                 if (sContentID == null)
  59.                  sContentID = "content1";
  60.                 else
  61.                 sContentID = request.getParameter("id").trim();
  62.                 //设置样式
  63.                 sStyleName = request.getParameter("style");
  64.                 if (sStyleName == null)
  65.                  sStyleName = "standard";
  66.                 else
  67.                 sStyleName = request.getParameter("style").trim();
  68.  %>
  69. <html>
  70. <head>
  71. <title>eWebEditor - eWebSoft在线文本编辑器</title>
  72. <meta http-equiv="Content-Type" content="text/html; charset=GBK">
  73. <link href="css/<%=sStyleCSS%>/Editor.css" type="text/css" rel="stylesheet">
  74. <Script Language=Javascript>
  75. var sPath = document.location.pathname;
  76. sPath = sPath.substr(0, sPath.length-14);
  77. var sLinkFieldName = "<%=sContentID%>" ;
  78. // 全局设置对象
  79. var config = new Object() ;
  80. config.Version = "<%=sVersion%>" ;
  81. config.ReleaseDate = "<%=sReleaseDate%>" ;
  82. config.StyleName = "<%=sStyleName%>";
  83. config.StyleEditorHeader = "<head><link href=""+sPath+"css/<%=sStyleCSS%>/EditorArea.css" type="text/css" rel="stylesheet"></head><body MONOSPACE>" ;
  84. config.StyleMenuHeader = "<head><link href=""+sPath+"css/<%=sStyleCSS%>/MenuArea.css" type="text/css" rel="stylesheet"></head><body scroll="no" onConTextMenu="event.returnValue=false;">";
  85. config.StyleDir = "<%=sStyleDir%>";
  86. config.StyleUploadDir = "<%=sStyleUploadDir%>";
  87. config.InitMode = "<%=sInitMode%>";
  88. config.AutoDetectPasteFromWord = <%=sDetectFromWord%>;
  89. config.BaseUrl = <%=sBaseUrl%>;
  90. config.AutoRemote = <%=sAutoRemote%>;
  91. </Script>
  92. <Script Language=Javascript src="include/editor.js"></Script>
  93. <Script Language=Javascript src="include/table.js"></Script>
  94. <Script Language=Javascript src="include/menu.js"></Script>
  95. <script language="javascript" event="onerror(msg, url, line)" for="window">
  96. //return true ;  // 隐藏错误
  97. </script>
  98. </head>
  99. <body SCROLLING=no onConTextMenu="event.returnValue=false;" onfocus="VerifyFocus()">
  100. <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
  101. <tr><td>
  102. <%=sToolBar%>
  103. </td></tr>
  104. <tr><td height='100%'>
  105. <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
  106. <tr><td height='100%'>
  107. <input type="hidden" ID="ContentEdit" value="">
  108. <input type="hidden" ID="ContentLoad" value="">
  109. <input type="hidden" ID="ContentFlag" value="0">
  110. <iframe class="Composition" ID="eWebEditor" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" height="100%" scrolling="yes">
  111. </iframe>
  112. </td></tr>
  113. </table>
  114. </td></tr>
  115. <% if(nStateFlag.equals("1")){ %>
  116. <tr><td height=25>
  117. <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%" class=StatusBar height=25>
  118. <TR valign=middle>
  119. <td>
  120. <table border=0 cellpadding=0 cellspacing=0 height=20>
  121. <tr>
  122. <td width=10></td>
  123. <td class=StatusBarBtnOff id=eWebEditor_CODE onclick="setMode('CODE')"><img border=0 src="buttonimage/<%=sStyleDir%>/modecode.gif" width=50 height=15 align=absmiddle></td>
  124. <td width=5></td>
  125. <td class=StatusBarBtnOff id=eWebEditor_EDIT onclick="setMode('EDIT')"><img border=0 src="buttonimage/<%=sStyleDir%>/modeedit.gif" width=50 height=15 align=absmiddle></td>
  126. <td width=5></td>
  127. <td class=StatusBarBtnOff id=eWebEditor_VIEW onclick="setMode('VIEW')"><img border=0 src="buttonimage/<%=sStyleDir%>/modepreview.gif" width=50 height=15 align=absmiddle></td>
  128. </tr>
  129. </table>
  130. </td>
  131. <td align=right>
  132. <table border=0 cellpadding=0 cellspacing=0 height=20>
  133. <tr>
  134. <td style="cursor:pointer;" onclick="sizeChange(300)"><img border=0 SRC="buttonimage/<%=sStyleDir%>/sizeplus.gif" width=20 height=20 alt="增高编辑区"></td>
  135. <td width=5></td>
  136. <td style="cursor:pointer;" onclick="sizeChange(-300)"><img border=0 SRC="buttonimage/<%=sStyleDir%>/sizeminus.gif" width=20 height=20 alt="减小编辑区"></td>
  137. <td width=40></td>
  138. </tr>
  139. </table>
  140. </td>
  141. </TR>
  142. </Table>
  143. </td></tr>
  144. <% } %>
  145. </table>
  146. <div id="eWebEditor_Temp_HTML" style="VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px"></div>
  147. <form id="eWebEditor_UploadForm" action="upload.jsp?action=remote&type=remote&style=<%=sStyleName%>" method="post" target="eWebEditor_UploadTarget">
  148. <input type="hidden" name="eWebEditor_UploadText">
  149. </form>
  150. <iframe name="eWebEditor_UploadTarget" width=0 height=0></iframe>
  151. <div id=divProcessing style="width:200px;height:30px;position:absolute;display:none">
  152. <table border=0 cellpadding=0 cellspacing=1 bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#3A6EA5><marquee align="middle" behavior="alternate" scrollamount="5" style="font-size:9pt"><font color=#FFFFFF>...远程文件收集中...请等待...</font></marquee></td></tr></table>
  153. </div>
  154. </body>
  155. </html>