fck整合ecms的考虑
将ecms中的AddNews.php的
“//html编辑器”和“//强制签发权限”中的部分注释掉
就是用/**/括起来
找到</head>在他的上面加上
<!–fck–>
<script type="text/javascript" src="/e/admin/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'newstext' ) ;
oFCKeditor.BasePath = "/e/admin/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
<!–/fck–>
这就ok了
还有就是将fck放到admin文件夹下,注意fck有自己的上传组件,我对他们还没有验证的控制,可以自己删除,随后我会处理。
本整合只是js整合
下载地址
FCKeditor 2.5.1 (Latest Stable)
|
ZIP File (source code included):
|
FCKeditor_2.5.1.zip |
|
GZip File (source code included):
|
FCKeditor_2.5.1.tar.gz |
下面的比较简单阿js整合
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Integration/JavaScript
1加载fck
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
2调用
The TEXTAREA replacement method:
In <HEAD> add the "onload" method:
<script type="text/javascript"> window.onload = function() { var oFCKeditor = new FCKeditor( 'MyTextarea' ) ; oFCKeditor.BasePath = "/fckeditor/" ; oFCKeditor.ReplaceTextarea() ; } </script>
In <BODY> add the below code to replace an existing TEXTAREA in the page:
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
今天试验了一下php整合,改了一点代码成功了。
工具栏添加,找到一篇好文章。
http://www.javaeye.com/topic/150487