Tag Archives: FCKeditor

官方提供的集成fckeditor到mt中的方法

在fckeditor的网站上发现的,链接点这里
 
这一个的集成方法比较好,可以让日记主要内容、更多日记内容、日记关键字,都集成fckeditor。
 
其实对比以前的方法,在edit_entry.tmpl文件的<head>与</head>中间,加入
<script type="text/javascript" src="你的fckeditor的js地址"></script>
<script type="text/javascript">
window.onload = function()
 {
 var oFCKeditor = new FCKeditor( ‘text’ ) ;
  oFCKeditor.Height = "400" ;
  oFCKeditor.Width = "580" ;
  oFCKeditor.CheckBrowser = true ;
  oFCKeditor.ReplaceTextarea() ;
 
  pFCKeditor = new FCKeditor( ‘text_more’ ) ;
  pFCKeditor.Height = "400" ;
  pFCKeditor.Width = "580" ;
  pFCKeditor.CheckBrowser = true ;
  pFCKeditor.ReplaceTextarea() ;
}
    </script>
 
就可以实现了如果需要让关键字也增加格式

Continue reading

在mt中集成fckeditor的补充说明

以前说过在mt中怎么集成fckeditor。但随着我写得文章越来越长,问题就出现了
首先,以前的集成方法,是在“日记主要”内容中增加了fck,在“更多日记内容中”,并没有出现fckeditor。
而我为了减少页面长度,打算在以后写文章的时候,日记主要内容写摘要,而在更多日记内容中写主要内容。这样就导致了,需要的地方没有fck,而不需要的地方有fck。所以,还需要对集成方式进行一下修改。

Continue reading

集成fckeditor到mt中

虽然mt已经有了fckeditor的模块,但是安装起来依然很麻烦,所以下面说一下我给mt增加fck的方法。
 
首先进入 ../cgi-bin/mt/tmpl/cms 下,修改 edit_entry.tmpl 这个文件
在文件开头,<TMPL_INCLUDE NAME="header.tmpl"> 的下方增加下面的代码:
 

<head>
<script type="text/javascript" src="你的fck的js代码路径"></script>
<script type="text/javascript">
window.onload = function()
 {
 var oFCKeditor = new FCKeditor( ‘text’ ) ;
  oFCKeditor.Height = "600" ;
  oFCKeditor.Width = "577" ;
  oFCKeditor.ReplaceTextarea() ;
}
    </script>
</head>

 
 然后下载我下面的文件,上传至你mt的主目录中,注意usf文件夹需要权限777。
 
ps:
1、注意修改fck的配置文件,把其中的fck的js代码的地址修改为你自己的。
2、下面的fck是我订制过的。只保留了需要的功能,为了防止fck载入过慢。
3、usf文件夹也可以随便改名,然后修改fck的配置文件就行了。我把mt的上传文件夹也修改到了usf下。变态了一点,嘿嘿