Home > 整站程序 > fck整合ecms的考虑

fck整合ecms的考虑

February 26th, 2008 Leave a comment Go to comments

 将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
Categories: 整站程序 Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).