php调用ckeditor?怎么调用ckeditor
怎么调用ckeditor呢,下面小编来给大家总结一处利用php 调用ckeditor编辑器与js调用ckeditor的方法吧,其它脚本调用方法大致一样了。
PHP调用FCKeditor
将FCKeditor放在网站根目录
在PHP文件里面,包含/FCKeditor/fckeditor.php文件
在网页中需要放置该编辑器的地方插入下面代码即可调用:
<?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:
<script type="text/javascript" src="ckeditor/ckeditor.js"></script> <script type="text/javascript"> window.onload = function() { CKEDITOR.replace( "content" ); }; </script>
注意:这里的content是
如果是3.6.2版本,该语句可能要写成:
版本差异造成的问题,请大家在运行时注意这个问题。
在下一个页面根据name值content获取相应的值
教程网址:
欢迎收藏∩_∩但请保留本文链接。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
