jackyrong

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

  fckeditor是老牌的东西,之前用ewebeditor的,最近一个项目里是fckeditor,则其实可以这样用.

 

1 当然要先准备好fckeditor目录了.

2 在editor中,可以如下代码:
   //调用编辑器主体
include('editor/fckeditor.php') ;
//设置内容区域
$oFCKeditor = new FCKeditor('content');
$oFCKeditor->Value = $article['content'];

$contentarea = $oFCKeditor->CreateHtml();

 

其中$article['content']就是文章内容的变量.

 

然后在要用到编辑器的页面,
include('editor.php');

smarty模版里面
   $smarty->assign("contentarea",$contentarea);

 

模版文件里
   <td>{contentarea}></td>就可以了

内容框里提交的内容就是contentarea

 

 

posted on 2008-08-29 10:59  jackyrong的世界  阅读(425)  评论(0编辑  收藏  举报