The following code is used to extract Fckeditor. PHP uses $ _ POST [#39; p_info #39;] to obtain the value of FCKeditor. supplement: 1. the basepath path must be the same as the include path above... the following code is used to extract Fckeditor. 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 store the input variable in the database tutorial, its variable name is the name of the object you created. for example, the above is "p_info ".
2. in FCKeditor/_ samples/, there is an example of php Tutorial calling. for example, simples01.php and sampleposteddata. php. the following file is the php program that outputs the variable name. you can use this program to obtain the variable name in the text input box.
3. you can easily customize the toolbar function button of FCKeditor. you can customize a function button in the FCKeditor configuration file FCKeditor/fck_config.js according to your needs, corresponding to a unique name.
In fck_config.js, three toolbar styles have been set by Default: Default (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'], // The first line of the Toolbar ['item 4', '-', 'item 5', 'item 6', 'item n'] // The second line of the Toolbar];
Here '-' is used to create a split entry.
The instance code is as follows:
BasePath = $ BasePath; // Location of 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 the Fckeditor script file $ smarty-> assign ('content', $ content ); $ smarty-> display ("fck. tpl ");?>
To be displayed in the smarty file:
<{$content}>
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.
During use, you only need to change $ oFCKeditor-> ToolbarSet = 'default' to $ oFCKeditor-> ToolbarSet = 'WWW '. finally, delete all the directories starting with "_" In the FCKeditor directory to save space, such as _ test. _ samples.
Article URL:
Reprint ^ at will, but please attach the tutorial address.