php中使用fckeditor

在smarty中使用fckeditor,下载fckeditor放在根目录

 function fckeditor($content){

                $oFCKeditor = new FCKeditor ('FCKeditor1') ; //创建一个FCKeditor对象 ID为FCKeditor1
                $oFCKeditor -> BasePath = "fckeditor/" ; //设置FCKeditor路径
                $oFCKeditor -> Value = $content ; //设置默认值
                $oFCKeditor -> Width = "800" ; //设置默认值
                $oFCKeditor -> Height = "300" ; //设置默认值
                //$oFCKeditor -> Create () ; //创建。注意:若用到模板(如smarty)则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
                $fckeditor=$oFCKeditor->CreateHtml();
                return $fckeditor;
        }

    A+
发布日期:2015年01月15日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: