FK是一款优秀的开源的线编辑器,而且支持多国语言。 :)
介绍: [url=http://wasabi.iteye.com/admin/blogs/162969]几种所见所得的在线编辑器的分析 [/url]
官方的事例,但由于功能太多,运行的速度比较慢,而且这些功能对于一般使用都不是必须的。
所以我这里作一个结合smarty的最简单的演试,去掉了很多没用的文件,速度很快。
参考于:[url]http://www.phpchina.com/bbs/thread-54889-1-1.html[/url]
下载fck.rar就可以直接使用
使用效果:
[img]http://wasabi.iteye.com/topics/download/d9c4e0fb-ace7-3e54-8fa0-53b0243fe662[/img]
输出效果:
[img]http://wasabi.iteye.com/topics/download/ad161448-a016-37d9-ac1f-9bc6ec9367a0[/img]
介绍: [url=http://wasabi.iteye.com/admin/blogs/162969]几种所见所得的在线编辑器的分析 [/url]
官方的事例,但由于功能太多,运行的速度比较慢,而且这些功能对于一般使用都不是必须的。
所以我这里作一个结合smarty的最简单的演试,去掉了很多没用的文件,速度很快。
参考于:[url]http://www.phpchina.com/bbs/thread-54889-1-1.html[/url]
require('./smarty/libs/Smarty.class.php');
require('./FCK/fckeditor.php');
/********************实例化FCK***********************/
function editor($filedName,$value="请填写内容吧!"){
global $smarty;
$fck=new FCKeditor($filedName);
$fck->BasePath="./FCK/";
$fck->ToolbarSet="Default";
$fck->Height="200";
$fck->Width="100%";
$fck->Value=$value;
$fckeditor=$fck->CreateHtml();
$smarty->assign("editor",$fckeditor);
}
//调用,newsContent是from的filedName
editor("newsContent");
//取值
$content = htmlspecialchars($_POST["newsContent"]);
下载fck.rar就可以直接使用
使用效果:
[img]http://wasabi.iteye.com/topics/download/d9c4e0fb-ace7-3e54-8fa0-53b0243fe662[/img]
输出效果:
[img]http://wasabi.iteye.com/topics/download/ad161448-a016-37d9-ac1f-9bc6ec9367a0[/img]