Php calls the fckeditor editor on the page-PHP source code

Source: Internet
Author: User
The code in the fckeditor editor can be written as a function or category and called directly without writing so much code every time! 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!

PHP page:/* editor */include_once ".. /include/fckeditor. php "; // bring the editor in $ editor = new FCKeditor ('content'); // The name of the form item $ editor-> BasePath ="/fckeditor /"; // The editor directory $ editor-> ToolbarSet = "Normal"; // The name of the toolbar. you can load other $ editor-> Width = "95%" as needed "; // width $ editor-> Height = "250"; // Height $ editor-> Value = $ content; // initial Value $ fckeditor = $ editor-> CreateHtml (); // output the value of the variable $ fckeditor where the compiler is to be displayed. $ tpl-> assign ('fckeditor', $ fckeditor ); // template assignment HTML template page (I use smarty) {% $ fckeditor %} generally, the variable name "$ content = $ _ POST [" content "]" is called by the php page. add:Modify page: 

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.