How PHP introduced Baidu ueditor Rich text editor

Source: Internet
Author: User

Text Editor plug-in rich content, compared to the traditional textarea tag input to use a lot, see how to introduce in the page implementation

1. Download the appropriate Resource pack (can go to the official website to download the appropriate version), I was introduced by PHP

2. Download and unzip to a location. (I'm using the TP framework, so I put it under my designated public folder Pbulic)

3. Introducing in the page

First write the path to the resource bundle in the head tag, and the path to write the path to the resource bundle.

<Scripttype= "Text/javascript"src= "__public__/ueditor/ueditor.config.js"></Script><Scripttype= "Text/javascript"src= "__public__/ueditor/ueditor.all.min.js"></Script><Scripttype= "Text/javascript"src= "__public__/ueditor/lang/zh-cn/zh-cn.js"></Script>

Reserve a label where it needs to be inserted, either DIV or textarea to have the tag's ID as content

Add JS code to the editor at the end of the page

    <Scripttype= "Text/javascript">Ue.geteditor ('content', {initialframewidth: -, Initialframeheight: $})    </Script>

Now the page will be displayed correctly.

How PHP introduced Baidu ueditor Rich text editor

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.