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

Showing the section for links to the section type of links

Open Archie-2021 opened this issue 2 years ago • 8 comments

I like how the core plugin could be used as a little pop up dictionary like way of adding information to the text (showing only relevant info). I think that should be the default with added option to change it to show the whole note.

And thank you for your excellent plugin, it is really useful for me

Archie-2021 avatar Mar 26 '22 16:03 Archie-2021

Hmm, not sure what you're referring to here. Maybe include a screenshot of the native functionality you're referring to which shows what you want it to look like.

nothingislost avatar Mar 26 '22 18:03 nothingislost

Hmm, not sure what you're referring to here. Maybe include a screenshot of the native functionality you're referring to which shows what you want it to look like.

how it looks with out this plugin(it shows only the section in links in format of [[note#section]]): image

how it looks with it:

image

Archie-2021 avatar Mar 27 '22 06:03 Archie-2021

One possibility for doing this would be to integrate with the Zoom plugin, in cases where the opened popover is in source mode and targeting a specific heading or block. I tried a quick proof of concept, and we can call its zoomIn() API from the place where we're re-setting the ephemeral state when displaying in source mode. It probably needs to be an option, and this won't work for reading mode, unless somebody can write the equivalent for that. But for source mode it might be a good place to start. (And an option to always open subpath links in edit mode might be a good addition, so folks who prefer the zoom can still get it even when they'd ordinarily want reading mode.)

pjeby avatar Apr 13 '22 22:04 pjeby

Out of curiosity, any update info about this, since its been over a year since last comment.

Eneswar avatar Jul 02 '23 21:07 Eneswar

It'll probably be in the next big HE release -- where "it" means "you can auto-zoom to a section or block if you have the Zoom plugin and enable the setting or use edit mode for your popups". That's also assuming my idea for doing that actually works.

No guarantees on when I'll actually work on that release, though: a lot of my plugin dev time is currently blocked out for work on Hotkey Helper, Tag Wrangler, Pane Relief, and possibly a couple of new ones.

pjeby avatar Jul 03 '23 05:07 pjeby

Got it, the feature is a vanilla feature, I thought it would be easy to somehow tap into that but I assume thats not how that works lol, sorry I dont know much about these stuff.

Eneswar avatar Jul 03 '23 05:07 Eneswar

Obsidian doesn't actually provide a built-in way to display only part of a note in a reading or editing view, though. (Yes, you can do it in a page preview or embed, but you can't edit those, and this is the Hover Editor plugin!)

Notice that if you just click on a section link instead of hovering it, you'll notice that Obsidian just jumps to that part of the note - it doesn't open a view with only that part, and doesn't give plugins a way to do it, either. A Hover Editor popup is literally just a tab we tear off and float over the others, so if you can't do it in a regular tab, you can't do it in a Hover Editor.

(And currently, the only way to do it in a regular tab is to use the Zoom plugin.)

pjeby avatar Jul 03 '23 08:07 pjeby

Thank you for the explanation, it makes things more clear. I hope I didnt come across as ignorant, and wish you the best with the update. :)

Eneswar avatar Jul 03 '23 09:07 Eneswar