FCKeditor是一個專門使用在網頁上屬于開放源代碼的所見即所得文字編輯器。它志于輕量化,不需要太復雜的安裝步驟即可使用。
在Asp中調用
首先在文件頂部包含主文件
<!--#include file="../fckeditor.asp"-->
在適當的地方插入文本區域內容:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.ToolbarSet = "A" ’使用工具條
oFCKeditor.Width = "100%" ’寬度
oFCKeditor.Height = "400" ’高度
oFCKeditor.Value = ’源文件
oFCKeditor.Create "content" ’文本框名稱
%>
在JSP中調用
web.xml配置:
FckEditor for java 2.4版本
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
net.fckeditor.connector.ConnectorServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>

/fckeditor/editor/filemanager/connectors/**//*
</url-pattern>
</servlet-mapping>
在JSP中使用標簽調用demo:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<html>
<head>
<title>FckEditor測試</title>
</head>
<body style="text-align: center;">
FckEditor測試
<hr>
<form action="ShowData.jsp" method="post">
<FCK:editor instanceName="test" height="400pt">
<jsp:attribute name="value"> 這里是http://baike.baidu.com/">數據測試
</jsp:attribute>
</FCK:editor>
<input type="submit" value="提交"/>
<input type="reset" value="重置"/>
</form>
</body>
</html>

