Home > Backend Development > PHP Tutorial > PHP calls ckeditor? How to call ckeditor_PHP tutorial

PHP calls ckeditor? How to call ckeditor_PHP tutorial

WBOY
Release: 2016-07-13 10:43:50
Original
1166 people have browsed it

How to call ckeditor? Let me summarize for you how to use php to call ckeditor editor and js to call ckeditor. The other script calling methods are roughly the same.

PHP calls FCKeditor

Place FCKeditor in the root directory of the website
In the PHP file, include the /FCKeditor/ckeditor/" target="_blank">fckeditor.php file

Insert the following code into the web page where the editor needs to be placed to call it:

The code is as follows
 代码如下 复制代码
   //包含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();
   ?>
Copy code

//Contains fckeditor class

Include("fckeditor/fckeditor.php") ;

//Create a FCKeditor with the form name jzleditor $oFCKeditor = new FCKeditor("jzleditor"); //Set editor path

$oFCKeditor->BasePath = "fckeditor/";

$oFCKeditor->ToolbarSet = "Default";//Tool Button

$oFCKeditor->Value =$cont; //;Set initial content
 代码如下 复制代码


$oFCKeditor->Width="100%"; //Set its width

$oFCKeditor->Height="550px"; //Set its height

$oFCKeditor->Create();

?>

Enter the content and after submission, obtain the input content through $_POST["jzleditor"] in the processed file

js calls FCKeditor

The use of CKEDITOR is very simple. First download CKEDITOR 3.6.1 (the default is the PHP version), and then write the following two paragraphs of js in the head of the calling page:

The code is as follows Copy code

Note: The content here is the name of If it is version 3.6.2, this statement may be written as:

Problems caused by version differences, please pay attention to this problem when running. Get the corresponding value based on the name value content on the next page http://www.bkjia.com/PHPjc/633142.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633142.htmlTechArticleHow to call ckeditor? The following editor will summarize for you how to use php to call ckeditor editor and js to call ckeditor. The method, other script calling methods are roughly the same. PHP call...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template