Closed tciecka closed 7 years ago
Hey tciecka
Thanks for the examples.
I will have a look to handle this and release a bugfix.
Thanks
Hi @tciecka
I just released a new version 0.7.1. It should fix your issue by adding the ability to reference local files, relatively and absolutely.
You have to add the protocol file:/// in front of every reference, otherwise it is not detected. This is to stay consistent with the http and https protocol/scheme checks internally.
My test included:
![Test](file:///C:/test/icon48.png)
![Test](file:///./icon48.png)
![Test](file:///icon48.png)
![Test](file:///C:/Users/Name%20Surname/Downloads/icon48.png)
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png)
Everything was loaded correctly. If the path is relative, the path of the current file is used. If the file has not been saved it does not work, obviously ^^' Spaces in the path have to be escaped with %20 and you may only use forward slashes.
I hope this helps your documentation and my test cases were enough to filter everything out.
If not, just let me know.
Sorry for the long time to fix but Cheers :)
Hello nea, I use your greatest plugin, but I suppose what local images in same folder should be rendered just with
![Title](1.png)
It's easier to understand and shorter to write. Markdown doesn't have common standard for this, but here and here you find the proposal:
![Alt text](/path/to/img.jpg)
I also use ReText and it works with images same way.
Hey @andrewanswer
Thanks a lot ^^ Yeah, when I worked on the fix for this I thought about that. But the parsing made it way easier with the file:/// prefix. But I'll keep this on my desk to fine-tune the parser and renderer accordingly.
Cheers
I just wanted to note, that on github for example ,using the file:/// prefix for local doesn't work when viewed on line.
Neither GitHub's Markdown renderer, nor Pandoc support "file:///" URI (security concerns?) Thus, requiring local files to be referred with "file" scheme makes Markdown files not really portable.
Please allow bare file paths (or ",/path") in the image statements
Hi, I think this should be re-opened because (1) the file:///
prefix is not compatible with online renders (ex: Github) and (2) it's not part of the commonmark spec to which this project claims adherence.
I'm not demanding a fix (though we'd love one :wink:), just suggesting it be left open to reflect the current status of things.
I'm not sure if this is the right place for this. Images were working fine for me, but after a computer reboot, they are no longer working. Ideas? Suggestions?
I also have a request/question. I am using MarkdownViewer++ to work on books published through LeanPub. They require a pre-named default location for images and other resources (I've asked if they could help as well). The only way I have right now of making images show in the viewer without having is to keep a copy of all images in the same directory as the text as well as a copy in the directory required by LeanPub. It's a pain. Is there any way to specify a default directory so I don't need 2 copies of every image?
Spaces do not seem to be picked up correctly using images.
also this issue post is from 2017 🤷♀ u can claim this is 'for personal use only' but your plugin shows up in the notpad++ plugin browser..
i would suggest anyone looking for a markdown editor to use the "Markdown Panel" plugin that can be found through the plugin browser in notepad ++ instead.
Adding "file:///", Exactly "View" works. but "Export as" doesn't work.
@nea here's a fix: https://github.com/nea/MarkdownViewerPlusPlus/issues/134
The viewer panel does not render images that are in a path relative to the file being edited. It does render remote images just fine, however. Examples have been included that demonstrate a failed render and a successful render. In both cases, the Export/HTML command will produce a document that is able to render in a browser since the links are properly formatted in both example cases.
Example1 - render failure:
![Test](./images/someImage.png)
Example2 - render success:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png)