nothingislost/obsidian-hover-editor

support click to trigger hover

quanru opened this issue · 9 comments

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

click a link to popup a editor

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

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.

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?

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

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.)

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

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.