Giter VIP home page Giter VIP logo

Comments (8)

lukakerr avatar lukakerr commented on August 20, 2024

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

from pine.

skiprca avatar skiprca commented on August 20, 2024

from pine.

lukakerr avatar lukakerr commented on August 20, 2024

@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

from pine.

lukakerr avatar lukakerr commented on August 20, 2024

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.

from pine.

noestreich avatar noestreich commented on August 20, 2024

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:

  • Since you just showed markdown-syntax in your screenshot-preview, it would be great if <img src=""> would also be supported.
  • i would greatly appreciate an easy possibility to insert an empty markdown image-tag ![]() with a shortcut. (for example: Macdown uses Command+Shift+I)
  • A quick and easy way to define image size (really important for PDF-Export) would be great. Something similar was already wished for for macdown before they ceased development. I quote:

"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!

from pine.

lukakerr avatar lukakerr commented on August 20, 2024

@noestreich regarding the feature wish list:

  • <img src=""> tags are supported for rendering images in #32
  • I will definitely add a shortcut for markdown images
  • In #32 you can specify the width and height using the HTML <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=""> directly

from pine.

noestreich avatar noestreich commented on August 20, 2024

Perfect and reasonable reply all around. Thanks for the fast feedback! Looking forward to use the image preview.

from pine.

lukakerr avatar lukakerr commented on August 20, 2024

The issue in #32 has been fixed! A good nights sleep always resolves any problems. I also implemented both markdown and HTML image shortcuts.

  • For a markdown image, the shortcut is Command+Shift+I
  • For a HTML image, the shortcut is Control+Shift+I

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.

from pine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.