obsidian-hover-editor icon indicating copy to clipboard operation
obsidian-hover-editor copied to clipboard

support click to trigger hover

Open quanru opened this issue 2 years ago • 10 comments

  • some thing like little arc in arc browser: https://resources.arc.net/hc/en-us/articles/19235387524503-Little-Arc-Quick-Lookups-Instant-Triaging

quanru avatar Mar 15 '24 09:03 quanru

Sorry, I don't understand. Click what to trigger hover of what?

pjeby avatar Mar 15 '24 17:03 pjeby

click a link to popup a editor

quanru avatar Mar 16 '24 01:03 quanru

Have you tried right-clicking and selecting "open in hover editor"?

pjeby avatar Mar 16 '24 06:03 pjeby

Yeah, I want every left click on a link to open the hover editor for preview. If it is necessary to jump to the file, then open it through a button.

quanru avatar Mar 16 '24 07:03 quanru

There are many ways to achieve the result of getting a hover editor to open for a link: you can do it with a keyboard command, a right-click + menu selection, or simply hovering the cursor (possibly with Ctrl/Cmd, depending on your Page Preview settings). Is there some reason these other methods don't work for you?

pjeby avatar Mar 16 '24 08:03 pjeby

Yeah, I know, I want to have a preview function with just a left-click, without any additional function keys.

quanru avatar Mar 16 '24 14:03 quanru

I'll go one better: here's how to have preview without any clicks at all:

  1. Go to the Obsidian settings, and under "Core Plugins", select "Page Preview"
  2. Turn off all the toggle switches
  3. Go to Hover Editor's settings, and change the "Trigger Delay" to 150

Now, when you move the mouse over any link, a preview will appear immediately without any keystrokes or clicks. (If there are places where this is too intrusive, you can turn back on the relevant toggle switches to require ctrl or cmd.)

pjeby avatar Mar 16 '24 17:03 pjeby

Sorry, I didn't make it clear. My original requirement is to achieve a function similar to the arc browser: https://www.youtube.com/watch?v=4PxiZWYh2U0&t=389

quanru avatar Mar 17 '24 01:03 quanru

Which function? If you want to just open an empty popup, there's a keyboard command for that. If you want a link to open in a popup, all you need to do is hover over it (if your settings are as I suggested above) and then click within it to begin editing or whatever else you want to do. I still don't understand what functionality it is you want -- you keep talking about the need for a left click, but you have not yet explained why the "left click" part is relevant.

If the left click part is for some reason the most important thing, then left click to open the link first, and then you can use a hotkey to open the current file in a hover editor (there is a keyboard command for that) or else right-click the tab and pick "open in hover editor".

At this point, it's not clear to me what you intend to do in the popup. If you intend to edit but are getting previews by default, and want to switch that using the mouse, then you should enable "Show view header by default" in Hover Editor's settings so you can click the edit mode button once the popup appears. That would give you editing with a single left-click, after simply hovering the link.

pjeby avatar Mar 17 '24 04:03 pjeby