When extracting Fckeditor, use the following
PHP uses $ _ POST ['p _ info'] to obtain the value of FCKeditor.
Supplement:
1. The basepath path must be the same as the include path above. Otherwise, the file cannot be found)
In addition, if you want to save the input variable to the database, its variable name is
Object Name. For example, the above is "p_info"
2. There is an example of php Tutorial calling in FCKeditor/_ samples/, for example, simples01.php.
And sampleposteddata. php. The file that follows is the php that outputs the variable name.
Program to get the variable name in the text input box.
3. You can easily customize the toolbar function button of FCKeditor.
In the FCKeditor configuration file FCKeditor/fck_config.js.
A function button corresponds to a unique name.
In fck_config.js, three toolbar styles have been set by Default: Default (package
Including all functions), Accessibility and Basic.
Let's take a look at the custom format of the toolbar style:
Config. ToolbarSets ["ToolBarSetName"] = [// Toolbar name
['Item 1', 'item 2', '-', 'item 3', 'item n'], // first line of Toolbar
['Item 4', '-', 'item 5', 'item 6', 'item n'] // The second line of the Toolbar
];
Here '-' is used to create a split bar.
Instance
<?
$ BasePath = "../include/FCKeditor /";
Include ($ BasePath. "fckeditor. php ");
$ Fck = new FCKeditor ('P _ info'); // create an object
$ Fck-> BasePath = $ BasePath; // location of the Fckeditor
$ Fck-> ToolbarSet = 'news'; // News is the custom Fckeditor toolbar name.
$ Fck-> Width = '000000'; // length
$ Fck-> Height = '000000'; // Height
$ Fck-> Config ['autodetectlanguage'] = false; // automatic language detection
$ Fck-> Config ['defaultlanguage'] = 'zh-cn'; // language
$ Content = $ fck-> CreateHtml (); // Create a Fckeditor script file
$ Smarty-> assign ('content', $ content );
$ Smarty-> display ("fck. tpl ");
?>
To be displayed in the smarty file
<Tr align = "left">
<Td colspan = "2" valign = "top" bgcolor = "# F5F5F5" class = "font12en">
<{$ Content}>
</Td>
</Tr>
The Default includes all the functions of FCKeditor. I personally feel that some functions are not used, and the full loading will affect the display speed. So I simplified it and only loaded some common functions:
1. Open the FCKeditor/fck_config.js file.
You only need to set $ oFCKeditor-> ToolbarSet = 'default'
Change to $ oFCKeditor-> ToolbarSet = 'WWW '.
Finally, we delete all the directories starting with "_" In the FCKeditor directory to save space, such as _ test. _ samples.