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

 

 

相关文章:

  • 2021-05-25
  • 2021-08-27
  • 2022-01-29
  • 2021-08-27
  • 2022-12-23
  • 2021-06-01
  • 2022-01-14
猜你喜欢
  • 2021-09-08
  • 2022-01-13
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案