How to call fckeditor editor in php_PHP tutorial

WBOY
Release: 2016-07-21 15:28:41
Original
886 people have browsed it

I just saw a method for sharing children's shoes on the forum. I didn't think it was very comprehensive. Now I'll share mine!

Copy code The code is as follows:

PHP page:
/* Editor*/
include_once ". ./include/fckeditor/fckeditor.php";//Introduce the editor
$editor = new FCKeditor('content');//The name of the form item
$editor->BasePath = "/ fckeditor/";//The directory where the editor is located
$editor->ToolbarSet = "Normal";//The name of the toolbar, you can load other ones according to your own needs
$editor->Width = " 95%";//Width
$editor->Height = "250";//Height
$editor->Value = $content;//Initial value
$fckeditor = $editor ->CreateHtml();//Just output the value of the variable $fckeditor where you want to display the editor
$tpl->assign('fckeditor', $fckeditor);//Template assignment

HTML template page (I use smarty)
{%$fckeditor%}

General php page call
content is the variable name I defined
$content =$_POST ["content"];
Add:


Modify page:


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323546.htmlTechArticleI just saw a method of sharing children’s shoes on the forum. I don’t think it is very comprehensive. Now I will share mine! Copy the code The code is as follows: PHP page: /* Editor */ include_once "../inclu...
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