刚才在论坛上看到一个童鞋分享的方法,感觉不是很全面,现在分享下我的! <div class="codetitle"><a style="CURSOR: pointer" data="47848" class="copybut" id="copybut47848" onclick="doCopy('code47848')"> 代码如下:<div class="codebody" id="code47848"> PHP页面: / 编辑器 / include_once "../include/fckeditor/fckeditor.php";//把编辑器引进来 $editor = new FCKeditor('content');//表单项的名称 $editor->BasePath = "/fckeditor/";//编辑器所在目录 $editor->ToolbarSet = "Normal";//工具栏的名字,可以根据自己的需求加载其他的 $editor->Width = "95%";//宽度度 $editor->Height = "250";//高度 $editor->Value = $content;//初始值 $fckeditor = $editor->CreateHtml();//在要显示编缉器的地方输出变量$fckeditor的值就行了 $tpl->assign('fckeditor',$fckeditor);//模板赋值 HTML模板页面(我用的是smarty) {%$fckeditor%} 一般php页面调用 content 是我定义的变量名 $content =$_POST["content"]; 添加: 修改页面: <INPUT name="content" id="content" type=hidden value="<?php echo $rows['content'];?>">
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!