Baidu editor ueditor usage summary-ueditor integration example based on Yii Framework

Source: Internet
Author: User
Baidu editor ueditor usage summary-ueditor integration example based on Yii Framework

Preview the Custom Edition page:

Address: http://ueditor.baidu.com/website/index.html

Ueditor is developed by Baidu. the legendary Baidu knows Chinese better, unlike KindEditor, which sometimes displays garbled characters. Ueditor provides download of the Chinese "UTF-8" and "gbk" versions. It can also be divided into the full version and customized version. There is nothing to say about the full version. let's talk about making a plate:

Customized edition allows you to select the desired features and then generate a download package based on the selected components. Address (http://ueditor.baidu.com/website/ipanel/panel.html ). Custom content includes components, editor background colors or images, editor height and width;

It is worth mentioning that Ueditor provides the function instructions and instructions for use. Developers can quickly understand the functions they can implement, save time to read the original JS code, and skillfully use Ueditor. Link to the document (http://ueditor.baidu.com/website/document.html), with instructions for use (from the Ueditor official website ):

Frontend and backend data interaction

1. rich text content interaction

1,Initialize the editor content (that is, set rich text to the editor)

Scenario 1: Write new articles and preset prompts and greetings in the editor.

Find the initialContent parameter in the editor_config.js file and set the value to a required prompt or greeting. for example, initialContent: 'Welcome to UEditor! '.

Scenario 2: edit the old article and extract rich text from the database and place it in the editor.

Obviously, when editing an article, you need to extract a large segment of rich text from the background database. if you still use the method in scenario 1 to set the initial value, it will inevitably lead to problems such as quotation mark matching being truncated, therefore, you need to set it in another way, as shown in the following code:

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.