fckeditor在线编辑器
来源:互联网 发布:陕西网络广播 编辑:程序博客网 时间:2024/05/18 00:17
fckeditor在线编辑器
第一步:首先在项目sec目录下建立一个fckeditor.properties,内容如下
<span style="font-size:18px;">connector.userFilesPath=UploadFileconnector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl</span>第二步:在webRoot下lib文件夹下导入Jar包
第三步导入文件夹
当然可以到这里去下载这个文件
http://pan.baidu.com/s/1hsvv7gg
第四步:在index.jsp中访问,代码如下
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%@ taglib uri="http://java.fckeditor.net" prefix="fck" %><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> <form id="form1" name="form1" method="post" action="fckeditor.jsp"> 文章标题 <input name="title" type="text" id="title" size="60"><BR/> 文章正文: <fck:editor instanceName="ArtContent" width="700" height="350"> <jsp:attribute name="value"></jsp:attribute> </fck:editor> <input type="submit" name="submit" value="提交"> </form> </body></html>index.jsp界面如下:
如果访问test.jsp,代码如下
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%><% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String content=request.getParameter("edt1"); if (content != null) { content = content.replaceAll("\r\n", ""); content = content.replaceAll("\r", ""); content = content.replaceAll("\n", ""); content = content.replaceAll("\"", "'"); }else{ content = ""; } content = new String(content.getBytes("iso8859-1"),"utf-8");%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <base href="<%=basePath%>"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>fck 测试</title> <script type="text/javascript" src="fckeditor/fckeditor.js"></script></head><body> <form method="post" name="frm1"> <FCK:editor height="400" instanceName="edt1" value="<%=content%>" toolbarSet="Basic"> <FCK:config SkinPath="skins/office2003/"/> </FCK:editor> <input type="submit" value="提交"> </form> <hr> <%=content%></body></html>界面如下
总结:所需jar包及文件都在http://pan.baidu.com/s/1hsvv7gg
这就是编辑器,今后只需要在自己 的项目中引用就可以了
0 0
- 在线编辑器FCKeditor
- FCKeditor在线编辑器配置
- web在线编辑器FCKEditor
- FCKeditor在线编辑器
- FCKeditor在线编辑器(Java)
- FCKEDITOR在线编辑器
- FCKeditor html在线编辑器
- 在线编辑器fckeditor应用
- FCKeditor在线文本编辑器
- fckeditor 在线编辑器使用
- FCKeditor在线文本编辑器
- fckeditor在线编辑器
- 在线编辑器FCKeditor 2.0使用说明
- FCKeditor在线编辑器的使用
- FCKeditor在线编辑器的使用
- 在线编辑器FCKeditor 2.0使用说明
- FCKeditor在线编辑器的使用
- 在线编辑器 FCKeditor 的应用
- curl 常用命令 post、get
- bzoj 1131: [POI2008]Sta(树形DP)
- Vs2015OpenCV静态编译出错
- RabbitMQ 安装、配置和用户管理(CentOS、SUSE)
- const
- fckeditor在线编辑器
- Python-OpenCV 处理视频(一)(二): 输入输出 视频处理
- c++ 之vector
- 认识到生命的空无,就无往不胜
- OpenCV成长之路6:实现读入图片并且对图片进行复制
- Ubuntu14.04下如何编译c程序
- 杭电ACM 1001
- Python-OpenCV 处理视频(三)(四)(五): 标记运动轨迹 运动检测 运动方向判断
- iOS开发使用半透明模糊效果方法整理