fckeditor在java web 中集成

阅读更多
参看原文:http://hi.baidu.com/%B1%F9%B4%BC%DC%D4%C0%F2/blog/item/bf3d76e88f6f13d8d439c95c.html

http://blog.163.com/yuang_yu_ping/blog/static/469328762009112593213711/?fromdm&fromSearch&isFromSearchEngine=yes

我下载的是FCKeditor2.6.6。
将解压后的fckeditor文件下放在web目录下。

使用方法如下:
<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" %>
引入fckeditor类
<%@ page import="net.fckeditor.*"%>
引入fck的taglib
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>


引入css和js



<%
    FCKeditor fckEditor2 = new FCKeditor(request, "basicEditor");
    FCKeditor fckEditor = new FCKeditor(request, "defaultEditor");
%>






在前台js得到输入的值:
var oEditor = FCKeditorAPI.GetInstance('basicEditor') ;
var ninfo = oEditor.EditorDocument.body.innerText;

在后台得到相应值
String ninfo = getRequest().getParameter("basicEditor");

你可能感兴趣的:(fckeditor在java web 中集成)