1、添加代码,引入相关配置的js:
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
2、在html 的<head>标签里添加onload方法如下:
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
3、在<body>的相应位置添加TEXTAREA
<textarea id="Mytextarea" name="Mytextarea">这里是初值.</textarea>
(详见官网:www.fckeditor.net)
本文介绍如何在网页中集成FCKeditor富文本编辑器,包括引入配置文件、设置onload方法及添加TEXTAREA元素的具体步骤。
2877

被折叠的 条评论
为什么被折叠?



