Show title in page preview

Use case or problem

I would like to see the title of a note (generated from the filename and displayed when the “Show inline title” toggle is on) in the page preview when hovering over an internal link. Ever since that toggle became an option (and a default), I’ve been removing the H1 titles I had, so that the title wouldn’t show twice—but I would still like to see these titles in the page preview, especially because I use aliases quite a lot.

Proposed solution

The note title pulled from the filename would display in the page preview, just as it does in the full note, when “Show inline title” is toggled on.

Related feature requests (optional)

Page preview has no title (This wasn’t a feature request post, but a mod did close it and suggest turning it into one, which is what I’m doing with this post.)

5 Likes

I am wondering if it would be possible to do this with a CSS snippet…

Anyone?

I was also struggling with this and turns out: you can do this with a Snippet :sparkles:

Made a gist here: Display inline titles inside popovers. · GitHub

The CSS is:

.hover-popover .inline-title {
  display: block;
}
2 Likes

oh nice…
actually the one I really wanted to have in the preview is not the inline title but the tab title because it shows the full path of the file (which is actually the information I am looking for in this situation)

I tried

.hover-popover .view-header-title {
display: block;
}

but it doesn’t work…
Any ideas?

No ideas about that :thinking:

I think the problem is that this information is not there to begin with. The inline title was simply hidden but - as far as I can see in debugger - the view-header-title is simply not present in the popover.
Guess you would need an option or a plugin that adds that to popover and then you could show it.

Did you manage to figure anything out?

(Without Hover Editor) Page preview is actually something like embeds, so there is no view header in it. That’s why your snippet didn’t work.

But if you install the Hover Editor plugin and turn on the “Show view header by default” option, I believe you can get what you want.

1 Like