FCKEditor Demo

FCKEditor 的官方下载:

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

 

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

 

主要开发步骤:

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的名字相同

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值