Modify the background, because the background picture is uploaded to the attached static resource disk, the foreground is accessed with a separate domain name
So in the ueditor display the picture prefix, only in "Imageurlprefix": Configure the domain name, with the domain name on the encounter trouble, development environment, test environment, production environment domain names are not the same;
The Ueditor in the configuration item is placed in Config.json, as follows:
The problem is that each time you submit version control, the Config.json file to ignore the submission, and repeatedly confirm whether the submission is submitted, after the submission will cause the test environment to upload pictures, the image domain prefix is displayed in the production environment domain name, the image is not displayed directly.
So, has been trying to imageurlprefix from the Config.json in the project configuration file to come out, studied for two hours, no fruit.
Finally, through the tortuous way, or let Imageurlprefix get rid of fixed domain name restrictions, the editor of the image domain name prefix is to provide timely display effect, not used in storage.
So, we can take advantage of the current domain name, so that the domain name is kept consistent, no longer worry about the image prefix URL inconsistent situation.
Direct elaboration of the solution ideas:
1. Find Imageurlprefix used place ueditor.all.js, here to get the current domain name
2. Using Nginx's directory proxy mode
3. After modification, re-operate as follows
Look at the HTML code in the editor
In this way, the foreground display can be accessed with a static resource domain name, the background editor can directly use the background domain name
Solutions to the inability to dynamically configure Imageurlprefix in Ueditor