1.下载Fckeditor
2.把fckeditor文件夹拷贝到你项目的中WebRoot 根目录下;
3.新建一个web project 项目 起名为fckeditordemo
4.在fckeditordemo 项目中 新建一个名为input.html文件. 代码如下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>input.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<script src="fckeditor/fckeditor.js"></script>
请输入内容<br>
<form name="form3" id="form3" method="post" action="/fckeditordemo/servlet/addContent">
<input name="title" type="text"><br>
<script>
var editor=new FCKeditor('editor1');
editor.BasePath='/fckeditordemo/fckeditor/';
editor.Height='200';
editor.ToolBarSet='Default';
editor.Create();
</script>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
5.新建一个Servlet文件 名为AddContentServlet.java
映射改为addContent
代码如下:
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class AddContentServlet extends HttpServlet {
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
PrintWriter out = response.getWriter();
request.setCharacterEncoding("utf-8");
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>");
out.println(" <BODY>");
out.println("主题:<br>");
out.println(request.getParameter("title")+"<br>");
out.println("内容:<br>");
out.println(request.getParameter("editor1"));
out.println(" </BODY>");
out.println("</HTML>");
out.flush();
out.close();
}
}
分享到:
相关推荐
由于目前的版本提供的FCKEDITOR仅提供了JAVASCRIPT式的整合,因此,这里仅讲述如何应用JAVASCRIPT来整合FCKEDITOR到站点中,当然,其他各种语言的整合,你可以参考_samples文件夹中的例子来完成 1,假如编辑器已经安装在你...
按照FCKeditor的默认配置,可以完成一些常用的HTML可视化编辑工作,但在实际应用中,还需要对其做进一步的配置。FCKeditor控件的可配置属性不多,且配置后只能作用于一个单一实例。实际上,需要对FCKeditor编辑器...
NULL 博文链接:https://moonights.iteye.com/blog/432208
FCKeditor组件是HTML编辑器,可以同其他网络语言结合,生成后台管理系统,组织并生成HTML文档。通过介绍FCKeditor组件,阐述了FCKeditor组件在java中的配置过程及如何优化应用。
FCKeditor是一款功能强大的在线HTML编辑器,在博客日益兴盛的web2.0时代FCKeditor已经开始走向普通人的视线。 FCKeditor文本编辑程序(共享软件)为用户提供在线的文档编辑服务,其具有与微软office软件一样的功能...
按照FCKeditor的默认配置,可以完成一些常用的HTML可视化编辑工作,但在实际应用中,还需要对其做进一步的配置。FCKeditor控件的可配置属性不多,且配置后只能作用于一个单一实例。实际上,需要对FCKeditor编辑器...
FCKeditor(现在被称为CKEditor)是一个用于在Web应用程序中编辑HTML内容的开源富文本编辑器。它允许用户通过一个类似于常见文字处理软件的界面编辑和格式化文本,并具有许多常见的编辑功能,如文本样式、链接、图像...
在这一版本中我们完全实现了与轻松互联网开发平台的无缝整合,在平台中调用FCKeditor跟使用标签一样Easy(例子文件在_samples/editor目录下)。而且没给恶意攻击者留任何可能的漏洞。 另外,对重点功能也进行扩展,...
本文基于.Net的应用针对FCKEditor的源代码进行分析,同时改造了部分过于复杂的功能,将其简单化。供大家学习讨论之用 一、对"插入/编辑超链接"功能进行了彻底简化,不可否认源代码中考虑了超链接的几乎所有应用情景...
在Winform程序中使用Html编辑器的Demo,其实就是WebBrowser 中指向本地的静态Html页面来实现html格式内容编辑 以及HtmlEncode HtmlDecode转换,这个转换还可以用正则表达式实现,提供同行参考 ,Html编辑器采用的...
FCKeditor是一款功能强大的在线HTML编辑器,在博客日益兴盛的web2.0时代FCKeditor已经开始走向普通人的视线。 FCKeditor文本编辑程序(共享软件)为用户提供在线的文档编辑服务,其具有与微软office软件一样的功能,...
CKEditor是Fckeditor html编辑器了一个升级版本,用过fckeditor的站长都知道,由于其打开速度的不理想把fckeditor用于网站做为在线编辑器并不是明智的选择,ckeditor正好弥补了这一缺陷,ckeditor是由Frederico ...
随着java web程序应用开发的发展,出现了多种HTML在线文本编辑器(FCKeditor,xheditor,tinyMCE,CuteEditor,KindEditor,eWebEditor,UEditor),在网站的设计与制作过程中应用支持多种语言的在线文本编辑器可简化用户操作,...
6.3 HTML表单在Servlet中的应用 6.4 HTML表单验证 6.5 FCKeditor 框架应用 第7章 JDBC数据库连接 7.1 JDBC 概述 7.2 JDBC的工作原理 7.3 数据库的安装与使用 7.4 JDBC 编程 7.5 网络留言板V1.0 第8章数据库...
ckeditor是fckeditor html编辑器一个升级版本,是新一代的FCKeditor,是一个重新开发的版本。用过fckeditor的站长都知道,由于其打开速度的不理想把fckeditor用于网站做为在线编辑器并不是明智的选择,ckeditor正好...
ckeditor是fckeditor html编辑器一个升级版本,是新一代的FCKeditor,是一个重新开发的版本。用过fckeditor的站长都知道,由于其打开速度的不理想把fckeditor用于网站做为在线编辑器并不是明智的选择,ckeditor...
CKEditor是新一代的FCKeditor,是一个重新开发的版本,CKEditor是全球最优秀的网页在线文字编辑器之一,因其惊人的性能与可扩展性而广泛的被运用于各大网站。CKEditor 4.10.1 中文版 更新日志:2018-11-01已修复问题...
对于开发人员来讲,新颖网络Word图片上传控件能够非常容易的整合到OA,新闻网站,博客或者其它WEB应用程序中,并为用户带来前所未有的体验。 产品特点如下: 1. 基于标准HTTP协议,支持ASP,ASP.NET,JSP,PHP...
4.将以下代码添加到web.xml配置文件中: <servlet-name>Connector com.FCKeditor.connector.ConnectorServlet <param-name>baseDir <param-value>/upload/ <param-name>debug <param-value>true ...
最大的好处是,在设计AJAX网络应用程序时,轻松简便的操作就像设计桌面程序一样。 ZK包含了一个以AJAX为基础、事件驱动(event-driven)、高互动性的引擎,同时还提供了丰富多样、可重复使用的XUL与HTML组件,以及以...