最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php调用ckeditor?怎么调用ckeditor
时间:2022-06-24 23:08:05 编辑:袖梨 来源:一聚教程网
PHP调用FCKeditor
将FCKeditor放在网站根目录
在PHP文件里面,包含/FCKeditor/ckeditor/" target="_blank">fckeditor.php文件
在网页中需要放置该编辑器的地方插入下面代码即可调用:
代码如下 | 复制代码 |
//包含fckeditor类 include("fckeditor/fckeditor.php") ; //创建一个FCKeditor,表单名称为 jzleditor $oFCKeditor = new FCKeditor("jzleditor"); //设置编辑器路径 $oFCKeditor->BasePath = "fckeditor/"; $oFCKeditor->ToolbarSet = "Default";//工具按钮 $oFCKeditor->Value =$cont; //;设置初始内容 $oFCKeditor->Width="100%"; //设置它的宽度 $oFCKeditor->Height="550px"; //设置它的高度 $oFCKeditor->Create(); ?> |
输入内容,提交后,在处理的文件中通过$_POST["jzleditor"]来取得输入的内容
js调用FCKeditor
CKEDITOR的使用很简单,先download CKEDITOR 3.6.1(默认是PHP版的),然后在调用页面的head中,写下如下两段js:
代码如下 | 复制代码 |
|
注意:这里的content是<textarea>的名称,如下所示:
如果是3.6.2版本,该语句可能要写成:
版本差异造成的问题,请大家在运行时注意这个问题。
在下一个页面根据name值content获取相应的值
相关文章
- 光遇5.8季节蜡烛在哪里 光遇5月8日季节蜡烛位置攻略 05-08
- 光遇5.8肉桂卷代币在哪里 光遇5月8日大耳狗联动代币收集攻略 05-08
- 光遇5.8大蜡烛在哪里 光遇5月8日大蜡烛位置攻略 05-08
- 光遇5.8免费魔法有什么 光遇5月8日免费魔法收集攻略 05-08
- 崩坏星穹铁道2.2有什么更新 崩铁2.2版本更新内容介绍 05-08
- OKE交易所官网下载2024版 05-08