pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.61k stars 409 forks source link

[FEATURE] Add a tooltip to markdown links #3106

Closed AlphaHot closed 2 days ago

AlphaHot commented 5 days ago

Is your feature request related to a problem? Please describe.

I tend to get annoyed when I can't see where a link is directing me, which means I have to keep checking the editor.

Describe the solution you'd like

A potential improvement could be a tooltip like the one found at https://html.spec.whatwg.org/multipage/dom.html#attr-title.

<a href="https://en.wikipedia.org/wiki/IPv6" title="https://en.wikipedia.org/wiki/IPv6"">…

This tooltip could display relevant information about the link, giving users a clearer idea of what to expect before clicking.

Describe alternatives you've considered

There are none.

Additional context

image

Output from the debug section in the settings dialog

Expand QOwnNotes Debug Information =========================== ## General Info **Version**: `24.7.3` **Build date**: `Jul 21 2024` **Build number**: `1114` **Platform**: `linux (xcb)` **Operating System**: `Ubuntu Core 22` **Current architecture**: `x86_64` **Qt Version (runtime)**: `5.15.3`
pbek commented 5 days ago

I guess you are talking about the preview... That would be nice, but I haven't seen support for that in https://github.com/mity/md4c. 😬

AlphaHot commented 5 days ago

@pbek that's what I meant: https://github.com/mity/md4c/blob/481fbfbdf72daab2912380d62bb5f2187d438408/src/md4c-html.c#L332-L335

I wanted the title attribute in the markdown links:

[**Playground**](https://test.org/ title="Tooltip")

Thank you for your attention. Sorry to disturb you.

AlphaHot commented 5 days ago

image

But why is the closing tag </a> of the link not highlighted in orange? A bug?

pbek commented 5 days ago

[Playground](https://test.org/ title="Tooltip")

This link doesn't seem to work with md4c. Or does it for you?

But why is the closing tag of the link not highlighted in orange? A bug?

There is no highlighting for HTML! The first part was just detected as link with <some link>.