mvgrimes / obsidian-todotxt-plugin

Obsidian plugin to manage todotxt files
MIT License
54 stars 4 forks source link

Add linking support #9

Closed Gamer-Kold closed 10 months ago

Gamer-Kold commented 1 year ago

I would like to link to my notes within my todo list; is that possible?

mvgrimes commented 1 year ago

So a todo could look like:

(A) Review the [[New Project]] +Work

and New Project would be a link to that page in your vault, correct?

Sounds reasonable, but I haven't looked into how Obsidian handles links. Seems like it should be possible.

Gamer-Kold commented 1 year ago

Yes essentially.

I'm not too sure myself; not a big web developer. But the generateMarkdownLinks function in the obsidian API seems promising, (though it seems linked to the file manager).

Judging from how the documentation talks about links, I'd assume links are just anchor tags in the UI, right?

mvgrimes commented 12 months ago

After a little research, I haven't been able to find a way to accomplish this. We don't use the markdown processor, since we have a custom parser for the todotxt format. Recreating the HTML generated for links in markdown files results in something that looks like a link, but clicking has no effect.

<a data-href="Inbox" href="Inbox" class="internal-link" target="_blank" rel="noopener">Inbox</a>

Will need to explore the Obsidian documentation further or find another plugin that handles links and uses registerView/registerExtensions and custom parsing.