在Smarty中使用FCKeditor
2008-03-29 12:31
225 查看
<?php require_once('./FCKeditor/fckeditor.php'); require_once('./Smarty/Smarty.class.php'); //载入Smarty $smarty = new Smarty(); /* Smarty配置 */ $smarty->template_dir = "./templates/default"; $smarty->compile_dir = "./templates/compiled"; // $smarty->config_dir = "./templates/configs"; // $smarty->cache_dir = "./caches"; $smarty->left_delimiter = '{'; $smarty->right_delimiter = '/}'; createEditor('FCKeditor1'); $smarty->display('editor.htm'); /** * 生成编辑器 * @param string inputName 输入框名称 * @param string inputValue 输入框值 * @param string height 高 * @param string toolbarSet 工具条设置 */ function createEditor($inputName, $inputValue = '',$height='320',$toolbarSet='Default'){ $editor = new FCKeditor($inputName) ; $editor->BasePath = "../libs/editor/"; $editor->ToolbarSet = "Default"; $editor->Width = "100%"; $editor->Height = $height; $editor->Value = $inputValue; $GLOBALS['smarty']->assign("editor", $editor->CreateHtml()); } ?> editor.htm的内容: {$editor/}
相关文章推荐
- FCKeditor在PHP+SMARTY中的使用
- FCKeditor在smarty中的使用一例
- FCKeditor 在ASP.Net 中的使用说明
- [PHP]Smarty的使用
- 使用smarty模板或缓存实现页面静态化
- HTML编辑器FCKeditor使用详解
- 实例(Smarty+FCKeditor新闻系统)
- [置顶] PHP有无必要使用Smarty呢??
- MVC环境下fckeditor的使用示例
- PHP中使用Smarty模板目录结构配置
- Jsp中使用FCKeditor上传图片
- smarty模板里面使用php函数
- ASP.NET2.0 文本编辑器FCKeditor使用
- FCKeditor 的配置和使用方法(for PHP)
- FCKeditor 的配置和使用方法(for PHP)
- ASP.NET2.0 文本编辑器FCKeditor使用方法详解
- FCKEditor 的使用方法
- 我的php学习笔记(二十四)PHP模板引擎Smarty入门使用
- Thinkphp中使用smarty模板时刷新图片验证码
- smarty中section的使用