RyotaUshio / obsidian-pdf-plus

The most Obsidian-native PDF annotation, viewing & editing tool ever. Comes with optional Vim keybindings.
https://ryotaushio.github.io/obsidian-pdf-plus/
MIT License
470 stars 11 forks source link

[Feature] Add a `comment` template variable #225

Closed RyotaUshio closed 2 weeks ago

RyotaUshio commented 2 weeks ago

Describe your request

Currently, we need to write quite a complex javascript to extract annotation comments: https://github.com/RyotaUshio/obsidian-pdf-plus/discussions/132#discussioncomment-9452904

Solution: provide a simple variable comment for this purpose. It can be just an empty string when it's a backlink highlight (i.e. not actual annotation written in the fie)

samanthavenialogan commented 2 weeks ago

Holy crap that acted quickly! Already with the commit! How long do you think it will be before I can update and access the comment variable do you think?

RyotaUshio commented 2 weeks ago

I'm releasing the update within a few days.

RyotaUshio commented 2 weeks ago

Released in 0.40.8.

samanthavenialogan commented 2 weeks ago

Following up after the release of the comments feature. I have replaced the long string you provided to me in case case #132 and can confirm that the net 'comment' tag is working precisely as described and does not overwrite annotations created through the 'text' or 'selection' variables. Seems it's working pretty well ^^

I greatly appreciate it.

My current implementation: image

> [!{{calloutType}} ] {{linkWithDisplay}}
>>**Quote**: _{{selection}}_
>
>>**Comment**:  {{comment}}