No description
Find a file
Morten Trøjborg ce84f697a6 fix review issues: remove unnecessary assertions, use CSS classes
- Remove unnecessary type assertions flagged by Obsidian linter
- Extract getAnnotationTarget helper to avoid double-casting
- Replace element.style.visibility with CSS class toggling
- Use setCssProps for popup positioning instead of inline styles
2026-03-08 10:59:45 +01:00
.gitignore initial commit of Inline Annotations 2026-03-06 14:33:43 +01:00
esbuild.config.mjs initial commit of Inline Annotations 2026-03-06 14:33:43 +01:00
LICENSE initial commit of Inline Annotations 2026-03-06 14:33:43 +01:00
main.ts fix review issues: remove unnecessary assertions, use CSS classes 2026-03-08 10:59:45 +01:00
manifest.json prepare plugin for community submission 2026-03-06 23:19:33 +01:00
package-lock.json initial commit of Inline Annotations 2026-03-06 14:33:43 +01:00
package.json prepare plugin for community submission 2026-03-06 23:19:33 +01:00
README.md add demo video to README 2026-03-06 23:32:48 +01:00
styles.css fix review issues: remove unnecessary assertions, use CSS classes 2026-03-08 10:59:45 +01:00
tsconfig.json initial commit of Inline Annotations 2026-03-06 14:33:43 +01:00
versions.json prepare plugin for community submission 2026-03-06 23:19:33 +01:00

Inline Annotations for Obsidian

Add short notes to any text without creating a full page. Select a word or sentence, attach an annotation, and reveal it with a click or hover.

Perfect for TTRPG notes, study material, manuscripts, or anywhere you want hidden context on specific phrases.

https://github.com/user-attachments/assets/c38f869e-3c93-4b8f-a1c9-a2f25313c1a6

How it works

Write annotations inline using the {text::note} syntax:

The party finds a {locked chest::DC 15 — on failure, the mechanism jams}.

In reading view and live preview, only locked chest is visible. Click (or hover) to see the note in a popup above the text.

Usage

Create an annotation

  1. Select text in the editor
  2. Run Annotate selection from the command palette (Ctrl/Cmd + P), or right-click and choose Annotate selection

View an annotation

  • Click mode (default) — click the annotated text to show the popup, click elsewhere to dismiss
  • Hover mode — hover over the text, popup disappears when you move away

Edit or remove

Right-click any annotation in the editor to get Edit annotation or Remove annotation options.

Settings

Setting Options Description
Trigger mode Click / Hover How annotation popups are revealed

Installation

From Obsidian Community Plugins

  1. Open Settings → Community plugins → Browse
  2. Search for Inline Annotations
  3. Click Install, then Enable

Manual

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder inline-annotations in your vault's .obsidian/plugins/ directory
  3. Place the three files inside it
  4. Enable the plugin in Settings → Community plugins

Development

npm install
npm run dev    # watch mode
npm run build  # production build