Use of fckediter in php

Source: Internet
Author: User
In the index. php file, call its code and add the following code to the desired Editor:

<? Php
$ Fck = $ _ POST ["FCKeditor"];
If ($ fck! = "")
{
Echo htmlspecialchars ($ fck );
}
?>

<Html>
<Head>
<Title> fck test <title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
</Head>
<Body>
<Form action = "index. php" method = "POST">
<? Php
// Reference the FCKeditor. php file. The basic classes and data structures are all here.
Include_once ("FCKeditor/fckeditor. php ");
// Create an instance of the FCKeditor object. After myFCKeditor is submitted, the receiving data page $ _ POST ['myfckeditor'] uses
$ FCKeditor = new FCKeditor ('myfckeditor ');
// The position of FCKeditor. the position here is the 'fckeditor' folder.
$ FCKeditor-> BasePath = './FCKeditor /';
// Tool button settings
$ FCkeditor-> ToolbarSet = 'default ';
// Set its width
$ FCKeditor-> Width = '000000 ';
// Set its height
$ FCKeditor-> Height = '300px ';
// Generate
$ FCkeditor-> Create ();
?>
</Form>

<Br>
<Input type = "submit" value = "submit">
</Form>
</Body>
</Html>


Download fckediter demo

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.