Here is what I’m looking for while using the Markdown preview pane
- Hover mouse pointer over a link like this one: quicklook
- See a quicklook preview of the PDF file
Ideas anyone?
Here is what I’m looking for while using the Markdown preview pane
Ideas anyone?
I once wrote a script that inserts the Quicklook preview in the MD file using a data URI.
One could perhaps combine that with some CSS and a script to perform the hover action.
I wouldn’t do it, though. A data URL increases file size tremendously and makes it hard to work with the file in edit mode.
TL;DR:
Quicklook is something macOS (and perhaps iOS) provides. hover
is a function of the browser (or WebKit, in the case of DT). For good reasons, the browser (WebKit) can’t use APIs of the underlying machine directly (think FileManager
and your browser reading/sending/deleting files). So, it’s impossible to create a Quicklook image on the fly when you’re hovering. Not to mention that it’s probably not a good idea performance-wise: A user hovering expects an immediate response, not a lengthy (and repeated!) file creation.
Another possibility would be a script that
img
element to the MD file right behind the link to the imagestyle
element to the head of the MD file to hide the img
elements and reveal them when hovered overWhile that’s feasible, it causes trouble when you modify the MD file, adding/changing/removing images because then you’ll have non-functional links.
Conclusion: If you want HTML behavior, use HTML and a browser. It has been conceived for that. Markdown has been conceived to write HTML faster – not to mimic a browser.
Not looking to create a Quicklook image on the fly but rather hoping to view the PDF page that the link refers to in a popover PDF viewer once the mouse pointer hovers over the link…
A PDF viewer is even more demanding than creating a Quicklook preview, I suppose. Anyway, I’ve said all I have to say on that – you’re looking for HTML and browser features in a Markdown environment, and that’s not working.
It turns out that Obsidian has this feature already