Simple installation, debugging, and calling of the hundreds of UEditor in the php project, and ueditor installation and debugging

Source: Internet
Author: User

Simple installation, debugging, and calling of the hundreds of UEditor in the php project, and ueditor installation and debugging

For new users, only functions can be implemented, and other settings are completely default.

Preview:

1. First download it from the official website. Download the package and decompress it to the directory you want on the website. Put it in the root directory and insert the following HTML code in the Editor:

<! -- Load the editor container --> <! -- Add text to the following script as initialization content --> <script id = "container" name = "sb_remarks" type = "text/plain" style = "width: 600px; height: 200px; "> <p> <strong> <span style =" font-size: 14px; "> note: </span> </strong> </p> <br/> </p> </script> <! -- Configuration file --> <script type = "text/javascript" src = "./ueditor. config. js"> </script> <! -- Editor source code file --> <script type = "text/javascript" src = "./ueditor. all. js"> </script> <! -- Instantiate the editor --> <script type = "text/javascript"> var ue = UE. getEditor ('Container'); </script>

2. Call to pass the value

Add a sentence to the PHP file.

$sb_remarks=$_POST['sb_remarks'];

======================================

The following is my complete example code:

Index.html:

<! Doctype html> 

Sb_add.php

<? Php $ con = mysql_connect ("localhost", "root", "110"); if (! $ Con) {die ('could not connect :'. mysql_error ();} mysql_query ("set names 'utf8'", $ con); mysql_select_db ("bzec", $ con ); $ sb_name = $ _ POST ['SB _ name']; $ sb_numandtype = $ _ POST ['SB _ numandtype']; $ sb_home = $ _ POST ['SB _ home']; $ sb_usedate = $ _ POST ['SB _ usedate']; $ sb_address = $ _ POST ['SB _ address']; // $ sb_updatetime = $ _ POST ['SB _ updatetime ']; $ sb_updatetime = date ("Y-m-d G: I: s"); $ sb_remarks = $ _ POST ['SB _ remarks ']; // $ nikename = Trim ($ nikename);/* if (! $ Nikename |! $ Email) // judge whether it is null {echo 'cannot be blank'; exit;} */$ SQL = "INSERT INTO shebeidangan (sb_name, sb_numandtype, sb_home, sb_usedate, sb_address, sb_updatetime, sb_remarks) VALUES ('$ sb_name', '$ sb_numandtype', '$ sb_home', '$ sb_usedate', '$ sb_address', '$ sb_updatetime ', '$ sb_remarks') "; if (! Mysql_query ($ SQL, $ con) {die ('error: '. mysql_error ();} echo "add OK"; mysql_close ($ con)?>

3. If you want to modify the default font size of the editor, find "font" in the UEditor directory and ueditor. all. js file to find the font to change the font size and font size.

The above is all the content of this article. I hope you will like it.

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.