mvdkwast / obsidian-copy-as-html

Obsidian plugin: copy document as HTML, including images
MIT License
48 stars 11 forks source link

Convert [[internal links]] to <a> tag #47

Closed LuiZzz-Menezes closed 4 months ago

LuiZzz-Menezes commented 12 months ago

Is your feature request related to a problem? Please describe. I would like to request the functionality of being able to copy an internal link as an external link, as is done in the Obsdian_to_Anki plugin.

Describe the solution you'd like When we copy a selection that contains an internal link like [[test]], the plugin will convert that selection into an a tag with href. <a href="obsidian://open?vault=vaultName&amp;file=Test">Test</a>

Describe alternatives you've considered Didnt find another alternatives than that

Additional context As not everyone may want it, it would be interesting to just leave an option for those who want it. Full example if it helps: <a href="obsidian://open?vault=My%20Vault&amp;file=Test%20A">Test A</a>

Furthermore, thank you very much for the plugin, it was an alternative to my workflow that needed to copy some summaries from Obsidian to HTML.

mvdkwast commented 11 months ago

Hi @Luiz-nyan, I'll look into it, should probably be an easy feature to implement.

mvdkwast commented 6 months ago

I'm afraid this will take a little more time than what I have at the moment. Still seems like a good feature and welcoming pull requests :)

LuiZzz-Menezes commented 6 months ago

Don't worry about it! I'm still using the plugin for my workflow, but looks like this feature isn't something that other users are looking for since there's no comments or reactions in the post. Also, it's not something I urgently need, but as soon as you implement it, I'll be using it!

fetwar commented 5 months ago

I think this feature is really nice, particularly useful for communicating with people via email when you know they have the same vault.

In my opinion it should definitely be a setting that is able to be disabled though. For instance if I'm emailing someone I don't expect to have the Obsidian note, I wouldn't want them to get a "broken" link that won't work for them.

Potentially adding a setting that allows users to configure their internal link handling between some options like:

mvdkwast commented 4 months ago

For obsidian URI links we should to handle the following :

Besides the points @fetwar mentionned, I'd like to add :

mvdkwast commented 4 months ago

Remove link & remove text I can't see why this would be too useful myself, but mentioning here anyway

This option was in fact related to embedded (transcluded) documents. But, it seems that it doesn't do anything in the code currently.