Home > Backend Development > PHP Tutorial > How to call fckeditor editor in php page

How to call fckeditor editor in php page

高洛峰
Release: 2023-03-01 11:24:02
Original
1056 people have browsed it

I just saw a method for 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 "../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 can be based on your own Need to load other
$editor->Width = "95%";//Width
$editor->Height = "250";//Height
$editor->Value = $content;//Initial Value
$fckeditor = $editor->CreateHtml();//Just output the value of 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 the page:

Related labels:
php
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