How to call CKEditor, the following small part to summarize the use of PHP call CKEditor editor and JS call CKEditor method, the other script calls the same method.
PHP Call FCKeditor
Place FCKeditor in the Web site root directory
Inside the php file, contains/fckeditor/ckeditor/"target=" _blank ">fckeditor.php file
Insert the following code in the page where you need to place the editor:
The code is as follows |
Copy Code |
Contains the FCKeditor class Include ("fckeditor/fckeditor.php"); Create a FCKeditor, table sole name called 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 the width of it $oFCKeditor->height= "550px"; Set the height of it $oFCKeditor->create (); ?> |
Input content, after submission, in the processed file by $_post["Jzleditor" to obtain the input content
JS Call FCKeditor
CKEditor is very simple to use, first download CKEditor 3.6.1 (default is the PHP version), and then in the head of the call page, write down the following two segment JS:
The code is as follows |
Copy Code |
|
Note: The content here is the name as follows: </p><p><textarea name= "Content" >ddd if it is version 3.6.2, the statement may be written as:
Ddd
Issues caused by version differences, please pay attention to this issue at runtime.
Get the corresponding value on the next page based on the name value content
http://www.bkjia.com/PHPjc/633142.html www.bkjia.com true http://www.bkjia.com/PHPjc/633142.html techarticle How to call CKEditor, the following small part to summarize the use of PHP call CKEditor editor and JS call CKEditor method, the other script calls the same method. PHP call ...