Image address correction of Baidu editor ueditor

Source: Internet
Author: User

The Baidu editor I used is 1.4.2, which is relatively new compared with the current time. A path problem occurs after the previous version of 1.3 is updated to 1.4. This evening, I encountered a special strange problem, so I made a special round again and found that this thing had to be done by myself. The problem tonight is that the Local Computer win7 can be uploaded normally, the online centos can be uploaded normally, the testing machine is iOS, And the upload can be normal a few days ago. I don't know what's going on tonight, the file upload directory, it is strange to confirm that it is not a permission issue.

# This is the root directory of the Baidu editor. For security concerns, you can only write absolute paths in the host format of http: //... and cannot expose the root directory/XXX/xxx of your project. No one said this in the online tutorial. The Sina supervisor said that the root directory of the Website Cannot be exposed on the front end.

Window. umeditor_home_url = $ config ['domain '] + "/RES/local/JS/ueditor /";// Note that it is here!

# It makes sense to define the first definition. You can use the method that comes with the editor if it is not defined.
Window. ueditor_config.imageurl = $ config ['domain '] +'/goodspic? Type = 2 ';

# Uploading the text displayed in the directory area is not a path, but a path alternative.
Window. ueditor_config.savepath = ['upload'];

# Image Correction address: the folder to which the image is uploaded and the path of the image file displayed on the foreground. The upload path address written in PHP must be consistent with the image display path address to ensure access.
Window. ueditor_config.imagepath = $ config ['domain '] +'/RES/local/uploads /';

# Call method.
UE. geteditor ('addarea ')

The most important thing is 1, 2, 4. Now that you understand these three points, you can use the ueditor.

Image address correction of Baidu editor ueditor

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.