FCKEditor Demo

本文介绍如何集成FCKEditor富文本编辑器,包括下载官方包、导入必要文件及页面引用方法。通过简单的步骤,即可在项目中使用FCKEditor实现强大的富文本编辑功能。

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

FCKEditor 的官方下载:

http://sourceforge.net/projects/fckeditor/

 

2.6版本的一个简单示例,下载地址:http://download.youkuaiyun.com/source/2800336(PS:不是我不想在JAVAEYE直接上传,但上传两次都没成功,故改优快云)

 

主要开发步骤:

1.下载官方包

2.导入对于开发语言需要的一些文件

3.页面引用,如

    <!-- FCKEditor -->
	<link href="<%=basePath %>fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=basePath %>fckeditor/fckeditor.js"></script>
	<script type="text/javascript">
	window.onload = function(){
	//var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
	var sBasePath = "<%=basePath %>fckeditor/";
	//alert(sBasePath);
	var oFCKeditor = new FCKeditor( 'contents' ) ;
	oFCKeditor.BasePath	= sBasePath ;
	oFCKeditor.ReplaceTextarea() ;
}

	</script>
	<!-- end of FCKEditor -->

 :

 4:修改原来的textarea代码:

<textarea name="contents" rows="10" cols="80" style="width: 100%; height: 200px">input something here ...</textarea>

 

需要注意的就是,textarea的名字和JS中构造的FCKeditor的名字相同

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值