标签:http io 使用 java ar 文件 sp cti on
将FCKeditor目录拷贝到工程中。
调用fckeditor
(1)使用JavaScript来调用。有两种方式。
第一种:直接调用方式。
步骤1:引入JS文件。
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
步骤2:
<script type="text/javascript"> var oFCKeditor = new FCKeditor( ‘FCKeditor1‘ ) ; oFCKeditor.BasePath = "fckeditor/" ; oFCKeditor.Create() ;</script>
第二种:通过替换多行文本框。
步骤1:引入JS文件。
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
步骤2:创建多行文本框
<textarea rows="10" cols="40" name="content"></textarea>
步骤3:
<script type="text/javascript"> window.onload = function() { var oFCKeditor = new FCKeditor(‘content‘) ; oFCKeditor.BasePath = "fckeditor/" ; oFCKeditor.ReplaceTextarea() ; }</script>
(2)通过JSP自定义标签来调用。
步骤1:导入jar包。
步骤2:导入标签库。
<%@taglib uri="http://java.fckeditor.net" prefix="FCK" %>
步骤3:
<FCK:editor instanceName="myFckeditor" basePath="/user/fckeditor" value=" "></FCK:editor>
标签:http io 使用 java ar 文件 sp cti on
原文地址:http://my.oschina.net/gslsz/blog/316574