BumbrT / obsidian-reading-comments

Reading comments, for consuming books or large articles in markdown with https://obsidian.md/.
MIT License
45 stars 1 forks source link
markdown-viewer obsidian-md obsidian-notes obsidian-plugin

Obsidian Reading Comments

Plugin allows to create inline html comments while reading markdown notes in Obsidian. Also native %%comments%% supported. Comments could be grouped hierarchically by tags. After commenting job done and finalized, original note with internal links to comments note (in plain obsidian markdown, clean from HTML formatting) could be extracted for integration with rest of the vault.

Obsidian forum thread

Readme на русском

Usage

Insert a comment

Select text in editor, which you want to comment. Open command panel and type Add reading comment for selection ,then press Enter .

It's recommended to assign hotkey for this command panel action.

You can use hierarchical Parent/Child tags in "data-tags" field.

Open comments panel

Open command panel and type Reading Comments Panel.

Extract original note with links to comments note

Open command panel and type Extract original note with links to comments note.

Features

Showcase

Buy me a coffee (or just star this repo:)

If you enjoy this plugin, feel free to buy me a coffee.

Create comment showcase

Create comment

Search comments in the panel showcase

Search comments

Extract original note with links to comments note showcase

Extract original note

Installation

Customization How To

How to add icon next to commented text

Implementation details for DIY plugin modifications and pull requests

Comments logic

Most important logic located in src/comments/ConstantsAndUtils.ts When Add reading comment for selection executed, editor selection replaced with the following code:

<div class="ob-html-comment" id="comment-${commentId}" data-tags="[comment,]"><span class="ob-html-comment-body">CommentPlaceholder</span>${htmlEscapedSelection}</div>

Plugin parses text for comments and organizes them in panel hierarchically by tags.

Display logic

All styles and display logic are located in styles.css and src/HtmlCommentsTemplate.vue files.

Thanks

Implementation has been based on the Obsidian Quiet Outline plugin. Basic idea has been taken from the Comments plugin.

Possible evolutioin directions

To introduce "nice to have" features, create issue here or better donate with "buy me a coffee" website

"Nice to have" features