The code in the fckeditor editor can be written as a function or category and called directly without writing so much code every time! I just saw a way to share my shoes on the forum. I don't feel very comprehensive. now I want to share it with you!
The code is as follows:
PHP page:
/* Editor */
Include_once "../include/fckeditor. php"; // introduce the editor
$ Editor = new FCKeditor ('content'); // name of the form item
$ Editor-> BasePath = "/fckeditor/"; // Directory of the editor
$ Editor-> ToolbarSet = "Normal"; // name of the toolbar. you can load other
$ Editor-> Width = "95%"; // Width
$ Editor-> Height = "250"; // Height
$ Editor-> Value = $ content; // initial Value
$ Fckeditor = $ editor-> CreateHtml (); // You can 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 %}
Php page call
Content is the variable name I defined.
$ Content = $ _ POST ["content"];
Add:
Modify page: