New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inserting/Pasting image into markdown/WYSIWYG editor displays wrong URL #4486
Comments
@niklasmh please adjust your issue to follow the bug report template and not a feature request.
Hello, please follow the issue template. A proper issue submission let's us better understand the origin of your bug and therefore help you. I will reopen your issue when we receive the issue following the template guidelines and properly fill out the template. Please update the issue. Thank you.
|
I have actually referenced the same issue in the description:
This issue is different in that it focuses on the URL and not the position. I may could have been clearer on this. I see the similarities with the issue. It is on the same copy/paste functionality. |
I found the solution. For future references: I had missed the part of the docs telling about the use of proxies: https://strapi.io/documentation/3.0.0-alpha.x/configurations/configurations.html#server. // ./config/environments/**/server.json
{
...
"proxy": {
"enabled": true,
"ssl": true,
"host": "customurl.com",
"port": 443
},
...
} The config above gave this result when pasting an image into the editor: I am still wondering why Anyway, great work with the editor! |
Hello. Is there a way to fix this in the latest version of Strapi? I applied the same solution as @niklasmh except I used the new js syntax instead of json. But the urls in the markdown text still point to the url urlwheresiteishosted.com instead of customstrapicms.com where the site is hosted instead of My server.js file:
For now I used a front-end solution by using replaceAll() function and then replacing '/uploads' with 'https://customstrapicms.com/uploads' |
Hello! Can you please create a new GitHub issue by using the GitHub issue template, providing all required information. Your issue looks related to that topic but it's an old one. Using another thread (GitHub issue) will be able to manage your case. Thank you and have a good day. |
This issue has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/how-to-make-a-blog-with-images-between-the-text/222/3 |
Describe the bug
I really, really like the insert/paste image function in the markdown/WYSIWYG editor, but as I am serving the website using your docker image
strapi/strapi
I get URLs like:http://localhost:1337/uploads/bca173c38e484f678322c0207aef56e0.png
, even though it is hosted athttps://wheremystrapiishosted.com
.Steps to reproduce the behavior
Expected behavior
I would like that the URL points to the current domain:
https://wheremystrapiishosted.com/uploads/...
. (aka nothttp://localhost:1337/uploads/...
)Screenshots
The image also jumps to the end of the file, but that is another issue: #978.
System
Additional context
... and ideas that may solve the problem
I am guessing this url (localhost:1337 in the image above) is set using the host and port from
./config/environments/development/server.json
. But changing this is not an option as this is the path through the docker container to the host machine.window.location.origin
) so this should be quite easy.It may be that the first idea is already possible, thus if it is, I would like to know.
The text was updated successfully, but these errors were encountered: