Closed skiprca closed 5 years ago
This is a known bug/missing feature. Unfortunately WKWebView
doesn't make it easy to include local assets (including images). I believe MacDown is using the old WebView
which makes this easier
Thank you for a fast response. Do you plan to implement this in near future or should I dig in myself? ;)
Regards, Aljoša On 9 Feb 2019, 00:28 +0100, Luka Kerr notifications@github.com, wrote:
This is a known bug/missing feature. Unfortunately WKWebView doesn't make it easy to include local assets (including images). I believe MacDown is using the old WebView which makes this easier — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@skiprca If your keen then definitely have a go to try and fix it, thanks! I was planning on getting to it some time in the future, but haven't had much time to work on it recently unfortunately
I've begun work on this in #32, but as you can read in the PR, there is a small problem i'm facing. If I can't solve it in the next few days, i'll merge the PR in anyway.
Just stumbled on entry #32 after unsuccessfully trying to get image preview to load. Glad you already started implementing it.
If i may add two comments and a feature-wish:
<img src="">
would also be supported. ![]()
with a shortcut. (for example: Macdown uses Command+Shift+I)"If there is a way to implement the syntax
![](pic/location/url =200x)
like Mou, or just add an alternative way of Command+Shift+I to input<img src="" width="">
directly."
Thanks a bunch!
@noestreich regarding the feature wish list:
<img src="">
tags are supported for rendering images in #32 <img>
tags. I don't plan to support setting width/height using the markdown syntax since CommonMark and GitHub Flavored Markdown don't support it either. Perhaps instead I will implement the shortcut mentioned to insert <img src="" width="">
directlyPerfect and reasonable reply all around. Thanks for the fast feedback! Looking forward to use the image preview.
The issue in #32 has been fixed! A good nights sleep always resolves any problems. I also implemented both markdown and HTML image shortcuts.
These new shortcuts and the new local image feature will be included in the next release. If there are any issues with images not appearing, please raise a new issue.
Hello!
I can't find a way for local image to render properly in preview window.
I use three files for testing:
Nothing of the following seems to work:
Web link works as it should:
I tried to preview same aaa.md in MacDown and it works for all cases.
Am I missing something?
Thank you for your time, Aljoša