YII Ueditor Rich Text Editor file and Image Upload configuration text tutorial, yiiueditor

Source: Internet
Author: User

YII Ueditor Rich Text Editor file and Image Upload configuration text tutorial, yiiueditor

After integrating Ueditor into the YII framework, you can add the desired functions to the editor by referring to the content in toolbars in editor_config.js:

Therefore, to add the file and Image Upload functions, add the following tags:

Two options are displayed in the Text Editor:

However, after you click the upload image button, you will find that the image cannot be uploaded normally and the file upload fails. The problem is that Flash Player needs to be upgraded,

Therefore, install the corresponding flash player component in Firefox and select one of them:

In this case, the file upload and Image Upload functions can be used normally:

Upload path settings:

1. Copy the PHP folder in the ueditor/ueditor1_2_2_0/folder to the root directory of the website and create an upload folder under the php folder. This folder is used to store uploaded files or images.

2. modify fileUp in the php folder. php and imageUp. in the PHP file, the upload path is "uploadPath" => "upload/", that is, the specified file upload path is under the newly created upload folder.


After uploading the corresponding file or image on the page, you can see the uploaded file in the php/upload/folder:

4. Finally, to modify the file or Image Upload path, you should modify the uploadPath in the fileUp. php and imageUp. php files in the php folder under the root directory of the website:

Note that the imageUpload is a sub-folder under the php folder directory, that is, the default root directory of uploadPath is php /.

Image/File Upload result:

The above is a graphic tutorial on the configuration of Ueditor Rich Text Editor files and image uploads in YII. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.