obsidian-copy-url-in-preview icon indicating copy to clipboard operation
obsidian-copy-url-in-preview copied to clipboard

Preview PDF Externally with right click instead of hover?

Open weldcloudnotes opened this issue 1 year ago • 6 comments

Frequently you'll have a PDF inline with your notes so that you can preview it while reading. This means that the context menu will be enabled and you can no longer scroll (both for the PDF content, and the Note you're embedding a PDF in) and you need to click somewhere to disable the context menu. Currently it hinders the workflow a little bit.

I also feel like it goes against the general philosophy of this plugin, where you can copy image to clipboard by right clicking, and copy url by right clicking, but on PDFs, you hover instead of right clicking.

This plugin is great regardless, I use it daily!

weldcloudnotes avatar May 12 '23 10:05 weldcloudnotes

The built in Obsidian viewer is about to change, so I'll probably wait a little for new functionality. I'm not sure how overriding the right click is possible technically, and if it clashes with other built in PDF functionalities (selecting text, etc). @mnaoumov what do you think?

NomarCub avatar May 12 '23 12:05 NomarCub

@NomarCub I already made a PR to support new pdf viewer from Obsidian 1.3.0 . In previous pdf viewer it was not possible to handle right click. The new pdf viewer I didn't check if we can switch to the right click instead

mnaoumov avatar May 12 '23 12:05 mnaoumov

I think this will fit in her: The context menu being triggered on hovering, will interfere interacting with pdfs inside obsmd. drawing

Right click would be neat, or an option to disable the plug-in only for pdfs, for the people who prefere working on pdfs inside obsmd.

Thanks a lot for the plug-in! :)

Friedolito avatar Sep 24 '23 12:09 Friedolito

I added an option to disable the PDF context menu. The Obsidian PDF viewer has this feature covered now anyway.

NomarCub avatar Sep 27 '23 19:09 NomarCub

Thank you for the quick action! :)

Friedolito avatar Sep 27 '23 20:09 Friedolito

The disable option and the built in Obsidian functionality addresses the concerns here. If @weldcloudnotes or someone else has no objection, I'll close this.

Here's the native PDF menu now: image

NomarCub avatar Apr 20 '24 09:04 NomarCub

I spent half a year losing my mind over this hover beahviour without being able to identify its origin! Thank you for implementing an option to disable the PDF context menu (I would even suggest disabling it by default!).

m-beau avatar May 12 '24 21:05 m-beau

Yeah, I should have done that earlier. I changed the default to disabled now. I'll make a release soon.

NomarCub avatar May 14 '24 05:05 NomarCub