Use of Baidu ueditor Rich Text Editor

Source: Internet
Author: User

Use of Baidu ueditor Rich Text Editor
// The following figure shows how to configure ueditor v1.3.5 php downloaded from the official website.
Step 1:
// The configuration file should be introduced first than the function file, and then set the language type. That is: editor. config. js ==> editor. all. min. js ==> lang/zh-cn/zh-cn.js

<script type="text/javascript" src="ueditor/editor.config.js"></script> <script type="text/javascript" src="ueditor/editor.all.min.js"></script> <script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script>

Step 2:
// Place the text width on the webpage

<Textarea name = "content" id = "content"> write your initialization content here </textarea> <script type = "text/javascript"> UE. getEditor ('content'); // 'content' is the ID value of the preceding text box. </script>

Step 3:
Modify the global path in the configuration file editor. config. js (three solutions ):
1) var URL = window. UEDITOR_HOME_URL | "/myUeditor (website root folder)/ed (UEditor folder )/";

2) window. UEDITOR_HOME_URL = "/myUeditor (website root folder)/ed (UEditor folder )/";
Var URL = window. UEDITOR_HOME_URL | getUEBasePath ();
3) var URL = "/myUeditor (website root folder)/ed (UEditor folder )/";
// In fact, the ultimate goal is to set the URL value as the path string from the website root directory to ueditor (* ended)

Step 4:
Toolbar tool settings:
Single row:
Toolbars: [["bold", "italic", "undo", "redo"]
Multiple rows:
Toolbars: [["bold", "italic"], ["undo", "redo"], ["insertimage"]
Step 5:

// Configure the default parameters of the editor, autoFloatEnabled: false // floating in the toolbar, elementPathEnabled: false // The element path is displayed in the lower left corner, autoHeightEnabled: false // whether the length is high automatically. The default value is true, set to false: the scroll bar is displayed when the parameter is exceeded. maximumWords: 10000 // maximum number of characters allowed, initialFrameWidth: 750 // initialize the editor width. The default value is 1000. initialFrameHeight: 400 // initialize the editor height, 320 by default, wordCount: true // whether to enable word count statistics, textarea: content // set the name attribute of the default text box content, you can also set the name attribute in the corresponding html.

  

// ============================== Ueditor's file directory description ========== ======================================= //
The content in the pop-up box of the dialogs editor is all in it. Cannot be deleted. We do not recommend that you move this directory.
Lang Editor supports internationalization. If you want to add Korean and Japanese support, you can add it here. Cannot be deleted. We do not recommend that you move this directory.
Php/jsp/. net Server-side processing program. The directory names are different in different versions. The jsp version is called jsp, and so on. It can be deleted. You need to develop related programs by yourself. You can move the files to change the upload path !!!
Themes editor skin directory. Cannot be deleted. We do not recommend that you move this directory.
Third-party packages since third-party editor. Cannot be deleted. We do not recommend that you move this directory.
Editor. all. js editor package the file, which is used in the development environment. The file cannot be deleted. We do not recommend that you move the file.
The compressed version after the editor. all. min. js editor is packaged. This file is used in the product environment. The file cannot be deleted. We do not recommend that you move the file.
Editor. config. js editor configuration file. It cannot be deleted. We do not recommend that you move this file. (generally, you need to configure a copy when backing up the file)
Ueditor. parse. js
Ueditor. parse. min. js
Index.html can directly block this file on the server. It is an official instance.

Related Article

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.