日期:2014-05-17 浏览次数:20735 次
<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>
<taglib> <taglib-uri>/FCKeditor</taglib-uri> <taglib-location>/WEB-INF/FCKeditor.tld</taglib-location> </taglib>
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/jsp/connector' ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector'; FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector' ; FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=File'; FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Image'; FCKConfig.FlashUploadURL = FCKConfig.BasePath +'filemanager/upload/simpleuploader?Type=Flash';
<%@ page contentType="text/html;charset=GBK"%> <html> <head> <title>FCKeditor Test</title> <script type="text/javascript" src="FCKeditor/fckeditor.js"></script> </head> <body> <form action="testUpload.jsp" method="post"> <% String content=request.getParameter("content"); if (content != null) { content = content.replaceAll("\r\n", ""); content = content.replaceAll("\r", ""); content = content.replaceAll("\n", ""); content = content.replaceAll("\"", "'"); }else{ content = ""; } String title = request.getParameter("title"); if(title != null){ title = title.replaceAll("\r\n", ""); title = title.replaceAll("\r", ""); title = title.replaceAll("\n", ""); title = title.replaceAll("\"", "'"); }else{ title = ""; } %> <table width=100%> <tr><td><input type="text" value="" name=title id=title/></td></tr> <tr> <td colspan=4 style='text-align:center' width=100% height=50px> <span> <script type="text/javascript"> var oFCKeditor = new FCKeditor('content');//传入参数为表单元素(由FCKeditor生成的input或textarea)的name oFCKeditor.BasePath='FCKeditor/';//指定FCKeditor根路径,也就