fck编辑器

<!-- FCK编辑器 -->
 <servlet>
  <servlet-name>Connector</servlet-name>
  <servlet-class>
   com.fredck.FCKeditor.connector.ConnectorServlet
  </servlet-class>
  <init-param>
   <param-name>baseDir</param-name>
   <param-value>/UserFiles/</param-value>
  </init-param>
  <init-param>
   <param-name>debug</param-name>
   <param-value>3</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
 </servlet>

 <servlet>
  <servlet-name>SimpleUploader</servlet-name>
  <servlet-class>
   com.fredck.FCKeditor.uploader.SimpleUploaderServlet
  </servlet-class>
  <init-param>
   <param-name>baseDir</param-name>
   <param-value>/UserFiles/</param-value>
  </init-param>
  <init-param>
   <param-name>debug</param-name>
   <param-value>true</param-value>
  </init-param>
  <init-param>
   <param-name>enabled</param-name>
   <param-value>true</param-value>
  </init-param>
  <init-param>
   <param-name>AllowedExtensionsFile</param-name>
   <param-value></param-value>
  </init-param>
  <init-param>
   <param-name>DeniedExtensionsFile</param-name>
   <param-value></param-value>
  </init-param>
  <init-param>
   <param-name>AllowedExtensionsImage</param-name>
   <param-value>jpg|gif|jpeg|bmp</param-value>
  </init-param>
  <init-param>
   <param-name>DeniedExtensionsImage</param-name>
   <param-value></param-value>
  </init-param>
  <init-param>
   <param-name>AllowedExtensionsFlash</param-name>
   <param-value>swf</param-value>
  </init-param>
  <init-param>
   <param-name>DeniedExtensionsFlash</param-name>
   <param-value></param-value>
  </init-param>
  <load-on-startup>2</load-on-startup>
 </servlet>

 <servlet-mapping>
  <servlet-name>Connector</servlet-name>
  <url-pattern>
   /FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
  </url-pattern>
 </servlet-mapping>

 <servlet-mapping>
  <servlet-name>SimpleUploader</servlet-name>
  <url-pattern>
   /FCKeditor/editor/filemanager/upload/simpleuploader
  </url-pattern>
 </servlet-mapping>
 <!-- 编辑器完 -->

 

 

页面引用

<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>

<textarea name="beizhu"  cols="50" rows="10" id="beizhuId"></textarea>

<script type="text/javascript">
      var FCKeditor = new FCKeditor("beizhu");
      FCKeditor.BasePath = "/FCKeditor/";
      FCKeditor.Height = 300;
      FCKeditor.ToolbarSet = "All";
      FCKeditor.ReplaceTextarea();
     </script>

 

 

简单模式:
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
   <textarea name="beizhu"  cols="50" rows="10" id="beizhuId"></textarea>
   <script type="text/javascript">
    var FCKeditor = new FCKeditor("beizhu");
    FCKeditor.BasePath = "/FCKeditor/";
    FCKeditor.Height = 200;
    FCKeditor.ToolbarSet = "Basic";
    FCKeditor.ReplaceTextarea();
   </script>   </td>

 

 

你可能感兴趣的:(JavaScript,jsp,servlet,fckeditor)