How to import fckeditor into Php+smarty _php tutorial

Source: Internet
Author: User
When extracting FCKeditor, use the following
PHP uses $_post[' P_info '] to get the value of FCKeditor
Add:
1. The path to basepath here must be the same as the path of the include above. You will not find the file)
In addition, for this input variable, if you want to put it into the database tutorial, its variable name for you to build
The name of the object. For example, above is "p_info."

2. In fckeditor/_samples/there is an example of a PHP tutorial call. such as simples01.php
and sampleposteddata.php these two. The back file is the output variable name of PHP
program, this program can get the text input box content variable name.

3. Configure the FCKeditor toolbar Function button can be easily customized, you can according to your
Needs to be customized in FCKeditor configuration file fckeditor/fck_config.js
A function button corresponds to a unique name.
Three toolbar styles are already set in Fck_config.js 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 '],//toolbar first line
[' Item 4 ', '-', ' Item 5 ', ' Item 6 ', ' Item n ']//toolbar second line
] ;
The function of '-' here is to create a split bar.

Instance

$BasePath = ". /include/fckeditor/";
Include ($BasePath. "fckeditor.php");

$FCK = new FCKeditor (' P_info ');//Create a pair of images
$FCK-basepath = $BasePath; where//fckeditor is located
$FCK-toolbarset = ' News ';//news is the custom fckeditor toolbar name
$FCK Width = ' 700 ';//length
$FCK, height = ' 350 ';//height
$FCK Config [' autodetectlanguage '] = false;//language automatic detection
$FCK Config [' defaultlanguage ']= ' ZH-CN ';//language
$content = $fck createhtml ();//Create FCKeditor script file
$smarty-Assign (' content ', $content);
$smarty, display ("Fck.tpl");
?>


Places to display in Smarty files



<{$content}>

The default defaults contain all the functions of the fckeditor, the individual feel that some functions are not used, the full load will also affect the display speed, so I simplified a bit, only loaded with some common features:
1. Open Fckeditor/fck_config.js File

Use only the $ofckeditor->toolbarset = ' Default '
Change to $ofckeditor->toolbarset = ' www '
Finally, we delete all the directories under the FCKeditor directory that begin with the underscore "_" to save space, such as _test._samples


http://www.bkjia.com/PHPjc/444748.html www.bkjia.com true http://www.bkjia.com/PHPjc/444748.html techarticle when extracting fckeditor, use the following PHP with $_post[' P_info '] to get the value of the FCKeditor: 1. The path to basepath here must be the same as the path to the include above. Otherwise, the file will not be found ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.