-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
<img> not rendering in live preview for .html files #907
Comments
The problem is that the previewer previews from a temporary file location and not in the folder that the actual file lives. So images aren't found unless there's a For example, the Markdown Previews render into <html lang="en">
<head>
<base href="file:///C:/projects/MarkdownMonster/"/> which allows it to find all the relative assets. This is also true for HTML files because it's not just previewed but basically 'rendered' (copied as is in this case) and then previewed using the standard editor/Markdown preview. At the time I probably didn't think about this much, just kind of as a bonus that it worked out of box. Agree with you though - MM should just open the file from the actual location. There are two ways this could be fixed:
So I think I'll take a look and see about 2. which on the surface sounds pretty straight forward. |
I've added the But this will not work, if the document already has a base tag and the base tag is not a fully qualified path. It's a nice enhancements for the most common use case even if it has limitations compared to the much more full featured preview features of Markdown. Thanks - this is a great addition! |
Thanks for this!! |
Updated in 2.3.7 |
While working on .html files, elements using relative links are not rendered in the live preview and instead yield the broken image icon (<img src="image.png"> yeilds ) Any ideas for why this is? It would be such a great help if there was any way of fixing this.
The text was updated successfully, but these errors were encountered: