- 浏览: 17452 次
- 性别:
- 来自: 长沙
最近访客 更多访客>>
最新评论
-
XMLDB:
初级阶段:增进沟通,加强了解
中级阶段:创造乐趣
高级阶段:追 ...
本人经验,教你泡MM,看了一定得顶! -
chen88358323:
starfeng 写道dengyin2000 写 ...
本人经验,教你泡MM,看了一定得顶! -
zhou2324:
上张图给兄弟们看下
本人经验,教你泡MM,看了一定得顶! -
zhou2324:
pwg17 写道楼主再开个贴,总结总结怎么搭讪吧
简单归纳下 ...
本人经验,教你泡MM,看了一定得顶! -
zhou2324:
再转点内容,所谓仁者 ...
本人经验,教你泡MM,看了一定得顶!
FCKeditor is an open source text editor for internet. It is compatible with most internet browsers which includes IE, Firefix, Mozilla and Netsacpe. On the server side, FCKeditor offers the JSP Integration Pack which makes it very easy to use FCKeditor in JSP web pages.
1. Download the JSP Integration Pack from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511
And download FCKeditor editor from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=75845
2. Install FCKeditor in a JSP environment:
Unzip the Java Integration Library, put the jar files FCKeditor-x-x.jar and commons-fileupload.jar in your webapp's WEB-INF/lib/ directory.
Unzip the FCKeditor editor zip file and put all JavaScript scripts in the /FCKeditor/ directory of your webapp.
The director structure is as follows:
3. Use FCKeditor in jsp pages
1) Put this taglib definition at the top of the JSP page:
2) Use the tag in jsp:
3) Config the File Browser Connector by adding the following piece of code in web application's web.xml:
And put in the fckconfig.js the following line:
4. Full example source code
1. Download the JSP Integration Pack from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511
And download FCKeditor editor from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=75845
2. Install FCKeditor in a JSP environment:
Unzip the Java Integration Library, put the jar files FCKeditor-x-x.jar and commons-fileupload.jar in your webapp's WEB-INF/lib/ directory.
Unzip the FCKeditor editor zip file and put all JavaScript scripts in the /FCKeditor/ directory of your webapp.
The director structure is as follows:
/webapp /FCKeditor /WEB-INF /classes /lib /fckeditor-x-x.jar /commons-fileupload.jar
3. Use FCKeditor in jsp pages
1) Put this taglib definition at the top of the JSP page:
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
2) Use the tag in jsp:
<FCK:editor id="marketing_scope" basePath="/FCKeditor/" height="300" skinPath="/FCKeditor/editor/skins/office2003/" imageBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" linkBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"> </FCK:editor>
3) Config the File Browser Connector by adding the following piece of code in web application's web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <description>FCKeditor Test</description> <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>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> </web-app> <servlet-mapping> <servlet-name>Connector</servlet-name> <url-pattern>/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern> </servlet-mapping> </web-app>
And put in the fckconfig.js the following line:
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ;4) Get and set the content in the editor with javascript:
function getEditorValue( instanceName ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; // Get the editor contents as XHTML. return oEditor.GetXHTML( true ) ; // "true" means you want it formatted. } function setEditorValue( instanceName, text ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; // Set the editor contents. oEditor.SetHTML( text ) ; }
4. Full example source code
<%@ page contentType="text/html; charset=utf-8"%> <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - JSP Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function setEditorValue( instanceName, text ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; // Set the editor contents. oEditor.SetHTML( text ) ; } function getEditorValue( instanceName ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; // Get the editor contents as XHTML. return oEditor.GetXHTML( true ) ; // "true" means you want it formatted. } </script> </head> <body> <h1>Hello World! FCKeditor</h1> <hr><% String submit = request.getParameter("submit"); if (submit != null) { String content = request.getParameter("content"); if (content == null) content = ""; out.println("Content: " + content); out.println("<hr>"); } %> <form method="post"> <FCK:editor id="content" basePath="/FCKeditor/" height="300" skinPath="/FCKeditor/editor/skins/office2003/" imageBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" linkBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"> </FCK:editor> <br> <input type="button" value="Set Value" onclick="setEditorValue('content', 'Hello World!')" /> <input type="button" value="Get Value" onclick="alert(getEditorValue('content'))" /> <input type="submit" value="Submit" name="submit" /> </form> </body> </html>
发表评论
-
思考?
2009-06-12 14:22 709http://philosophy.hku.hk/think/ ... -
最近的工作和心情
2009-06-12 09:22 702早上接到郑州路局方面的电话,叽里咕噜说了一通我忘记得差不多了, ... -
乱七八糟
2009-06-12 09:18 683这一个礼拜的状态之差 ... -
第一篇
2009-06-12 09:01 666早上四点半就起来了,最近老睡不好,心里老想着事,毕业一年了,一 ... -
好男人找不到女朋友的原因
2009-05-16 09:15 996男人不坏,女人不爱。这句话在现实中非常准确。虽然很多女人会矢口 ... -
本人经验,教你泡MM,看了一定得顶!
2009-04-21 17:04 3519鉴于很多程序员都 ... -
Linux启动过程全接触
2008-12-31 09:47 1105关于Windows启动过程介绍的文章可谓多如牛毛,而对于Lin ... -
史记.马加爵传
2008-12-30 15:08 360史记.马加爵传 马君加爵者,桂之宾阳人也。年及弱 ... -
史记. 范美忠传
2008-12-30 15:08 129史记. 范美忠传 川人范美忠,阔口黄牙,疏眉隆准,尝学于京师 ... -
史记.周正龙传
2008-12-30 15:07 197周正龙者,关中陕府人氏也。累世为农役,耕读持家, ... -
史记.陈光标传
2008-12-30 15:06 144史记.陈光标传 陈光标者,江苏苏北人也。少家贫 ... -
史记.嘉祥传
2008-12-30 15:05 139史记.嘉祥传 ... -
史记.王石传
2008-12-30 15:04 133史记.王石传 王 ... -
史记·陈冠希列传
2008-12-30 15:03 351史记·陈冠希列传 陈公 ... -
史记·宋祖德本纪
2008-12-30 15:02 223史记·宋祖德本纪 祖德者,靖江人也,江湖谓之龅牙 ...
相关推荐
这个是一个我修改过的fckeditor for jsp 的jar包的源代码,是fckeditor-2.3的,我修改了ConnectorServlet.java和SimpleUploaderServlet.java两个文件 我在这两个文件中都是加了一个静态变量encoding,private static...
本程序是描述怎样在jsp中加入fckeditor,并且获得fckeditor中编辑的数据
压缩包包括: 1、使用FCKeditor jsp版本必备的五个包 2、fckeditor.properties配置 3、FCKeditor_2.6.4.zip 4、web.xml详细配置 5、调用方法的index.jsp 6、详细使用步骤
JSP例子:Fckeditor整合web EQ 公式编辑器
修改如下 url, 使用 fckeditor servelt 来做文件上传与目录浏览: FCKConfig.LinkBrowserURL = FCKConfig.BasePath " filemanager/browser/default/browser.html?Connector=connectors/jsp/connector " ; FCKConfig....
jsp 程序调用fckeditor2.6 版本的 小例子 本人发现fckeditor2.6加 fckeditor for 2.3 的时候在上传中文文件的时候会出现乱码 所以本人就小改了一下 fckeditor2.3的源代码,以时间重命名上传文件名,没什么技术...
FCKeditor (jsp在线编辑器)配置总结
JSP使用Fckeditor所用jar包
一个简单的jsp调用FCKeditor 实例,是一个eclipse工程,适合初学者
一个关于FCKeditor+jsp的例子,我自己就是从这个例子里学习FCKeditor的。给需要的人
最新的fckeditor 2.6jsp版,完整安装包,解压后直接放在网站根目录下就能用了,各项已经配置好了。绝对OK
采用2.6.4版本,彻底解决fckeditor(jsp版)上传中文文件乱码问题。 使用Tomcat应用服务器时,为了更好的支持URL地址中的中文参数问题.需要在tomcat进行如下设置: 需要修改server.xml文件的如下行: maxThreads=...
NULL 博文链接:https://william-k.iteye.com/blog/777938
fckeditor 针对JSP页面上传图片功能的配置
三个压缩文件是我自己下载的,配置资料是网上的。 FCKeditor_2.6.5.zip fckeditor-java-2.6-bin.zip fckeditor-java-demo-2[1].6.war.zip 至于源码包,是用不上的
NULL 博文链接:https://gcguchao8888-sina-com.iteye.com/blog/526242
fckeditor在jsp页面中的运用fcktwo
NULL 博文链接:https://wangdingxin.iteye.com/blog/2313262
配置fckeditor 的参考 web 配置文件
FCKeditor2.3 for jsp编辑器(内附配置说明)