`

Fckeditor在线编辑器简单使用

阅读更多

Fckeditor在线编辑器简单使用

一、Fckeditor?

FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器,是一款流行的在线编辑器,可以和多种语言结合使用

二、替换textArea

大体步骤

1.加入Fckeditor的js路径

2.加入替换textArea的javascript

eg:

 

<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">

window.onload = function()
{
	//指定fckeditor资源在你的服务器中的位置,指定到资源的跟目录即可,如http://localhost:8080/BBS/fckeditor/
	var sBasePath = "<%=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/fckeditor/" %>"
	var oFCKeditor = new FCKeditor( 'cont' ) ;
	oFCKeditor.BasePath	= sBasePath ;
	oFCKeditor.ReplaceTextarea() ;
}

</script>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics