fckeditor用javascript创建,fckeditor用javascript创建
【 tulaoshi.com - PHP 】
首先介绍如何用javascript创建fckeditor
//--------------------------------------------------------------------------------------------------
第一在头部有个引用:
CODE:<script type="text/javascript" src="http://img.jcwcn.com/attachment/portal"#0000ff">加入创建代码(创建的代码有多种形式)
第一种创建模式: 直接创建
CODE:<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/FCKeditor/";
oFCKeditor.Create();
</script> 第二种创建模式: 替换textarea
CODE:<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "/FCKeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>在对于替换多个textArea时可以使用如下方法
CODE:<html>
<head>
<title>Testing ReplaceAll()</title>
<script type="text/javascript" src="http://img.jcwcn.com/attachment/portal"
来源:http://www.tulaoshi.com/n/20160129/1490463.html
看过《fckeditor用javascript创建》的人还看了以下文章 更多>>