FCKeditor使用说明

本文介绍了如何在项目中集成FCKeditor富文本编辑器,并提供了具体的步骤与示例代码,包括解压安装、配置路径及在JSP页面中使用的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、解压FCKeditor_2.2.zip,(FCKeditor主文件),将FCKeditor目录复制到网站根目录下,
 2、将FCKeditor-2.3/web/WEB-INF/lib目录下文件复制到自已项目的lib文件夹中


jsp:--------------------------------------------------------------------------------
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
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>    
    <title>demo</title>
<link type="text/css" rel="stylesheet" href="../ckeditor/_samples/sample.css" />
  </head>
  
  <body>
  <form action="sample_posteddata.jsp" method="post">
<p>
<label for="editor1">
Editor 1:</label>
<textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
</p>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
<ckeditor:replace  replace="editor1" basePath="./ckeditor/" />
  </body>
</html>


--------------------sample_posteddata.jsp-------------------------------------
          <%  request.setCharacterEncoding("utf-8");
String id = request.getParameter("editor1") ;//通知id
System.out.print(id);
%>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值