没有合适的资源?快使用搜索试试~ 我知道了~
Fckeditor教程.txt
需积分: 9 1 下载量 80 浏览量
2011-11-14
18:04:51
上传
评论
收藏 12KB TXT 举报
温馨提示
试读
11页
Fckeditor教程.txt讲解了如何配置和使用FCKeditor
资源推荐
资源详情
资源评论
========》将FCKeditor添加到项目 《=========
第一步:下载FCKeditor文件
第二步:解压到站点的WebRoot目录下
第三步 : 验证你是否安装成功
格式:
http://<your site>/<CKEditor installation path>/_samples/default.html
实例:
http://www.example.com/ckeditor/_samples/default.html
配置:
1、将FCKeditor集成到你的项目当中去。
将下面的js文件添加到你的jsp文件中的head标签中
<script type="text/javascript" src="/blog/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('textarea标签的名称') ;
oFCKeditor.BasePath = "/blog/fckeditor/" ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Height=400;
oFCKeditor.ReplaceTextarea() ;
}
</script>
注意:/blog/fckeditor/fckeditor.js中的/blog是文本项目名称
========》自定义标签 《=========
必须的jar文件:
commons-fileupload-1.2.1.jar
第一步:下载FCKeditor文件
第二步:解压到站点的WebRoot目录下
第三步 : 验证你是否安装成功
格式:
http://<your site>/<CKEditor installation path>/_samples/default.html
实例:
http://www.example.com/ckeditor/_samples/default.html
配置:
1、将FCKeditor集成到你的项目当中去。
将下面的js文件添加到你的jsp文件中的head标签中
<script type="text/javascript" src="/blog/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('textarea标签的名称') ;
oFCKeditor.BasePath = "/blog/fckeditor/" ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Height=400;
oFCKeditor.ReplaceTextarea() ;
}
</script>
注意:/blog/fckeditor/fckeditor.js中的/blog是文本项目名称
========》自定义标签 《=========
必须的jar文件:
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-io-1.3.2.jar
slf4j-api-1.5.6.jar
slf4j-simple-1.5.6.jar其中,slf4j-api-1.5.6.jar和slf4j-simple-1.5.6.jar必须是一个版本
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="FCK" uri="http://java.fckeditor.net" %>
<html>
<title></title>
<body>
<FCK:editor instanceName="myEditor" basePath="/fckeditor" value="this is a value" toolbarSet="myToobar"></FCK:editor>
</body>
</html>
========》 创建自己的配置文件 《=========
Fckeditor的主配置文件是fckconfig.js,可以直接修改此配置文件,但是不推荐。建议创建额外的配置文件。如myconfig.js
具体步骤如下:
1、创建myconfig.js配置文件(WebRoot下)
2、添加内容,如:
FCKConfig.AutoDetectLanguage= false ;
FCKConfig.DefaultLanguage= 'en' ;
3、将配置文件添加到fckditor中
a、在主配置文件中配置(fckconfig.js)
修改此属性:FCKConfig.CustomConfigurationsPath = '/项目名称/自定义的配置文件名称' ;
如:FCKConfig.CustomConfigurationsPath = '/test/myconfig.js'
注意:第一个/代表当前站点路径,
b、在调用的页面中指定配置文件,如:
<script type="text/javascript">
var oFCKeditor = new FCKeditor("FCKeditor1");
commons-io-1.3.2.jar
slf4j-api-1.5.6.jar
slf4j-simple-1.5.6.jar其中,slf4j-api-1.5.6.jar和slf4j-simple-1.5.6.jar必须是一个版本
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="FCK" uri="http://java.fckeditor.net" %>
<html>
<title></title>
<body>
<FCK:editor instanceName="myEditor" basePath="/fckeditor" value="this is a value" toolbarSet="myToobar"></FCK:editor>
</body>
</html>
========》 创建自己的配置文件 《=========
Fckeditor的主配置文件是fckconfig.js,可以直接修改此配置文件,但是不推荐。建议创建额外的配置文件。如myconfig.js
具体步骤如下:
1、创建myconfig.js配置文件(WebRoot下)
2、添加内容,如:
FCKConfig.AutoDetectLanguage= false ;
FCKConfig.DefaultLanguage= 'en' ;
3、将配置文件添加到fckditor中
a、在主配置文件中配置(fckconfig.js)
修改此属性:FCKConfig.CustomConfigurationsPath = '/项目名称/自定义的配置文件名称' ;
如:FCKConfig.CustomConfigurationsPath = '/test/myconfig.js'
注意:第一个/代表当前站点路径,
b、在调用的页面中指定配置文件,如:
<script type="text/javascript">
var oFCKeditor = new FCKeditor("FCKeditor1");
剩余10页未读,继续阅读
资源评论
空城.依旧
- 粉丝: 23
- 资源: 30
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功