No description
Find a file
root 118866ceff Address community review warnings
- Drop plugin id/name from command id and name
- Replace builtin-modules dep with node:module builtinModules
- Commit package-lock.json for reproducible builds

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:32:21 +00:00
.gitignore Address community review warnings 2026-06-15 23:32:21 +00:00
Demo.gif Add files via upload 2026-06-16 01:47:46 +05:00
esbuild.config.mjs Address community review warnings 2026-06-15 23:32:21 +00:00
LICENSE Prepare for Obsidian community submission: id "spoiler", add LICENSE 2026-06-15 21:49:58 +00:00
main.ts Address community review warnings 2026-06-15 23:32:21 +00:00
manifest.json Prepare for Obsidian community submission: id "spoiler", add LICENSE 2026-06-15 21:49:58 +00:00
package-lock.json Address community review warnings 2026-06-15 23:32:21 +00:00
package.json Address community review warnings 2026-06-15 23:32:21 +00:00
README.md Prepare for Obsidian community submission: id "spoiler", add LICENSE 2026-06-15 21:49:58 +00:00
tsconfig.json Implement spoiler plugin: ribbon button to wrap/unwrap selection 2026-06-15 19:42:52 +00:00
version-bump.mjs Implement spoiler plugin: ribbon button to wrap/unwrap selection 2026-06-15 19:42:52 +00:00
versions.json Fix unwrap corrupting content that contains code fences 2026-06-15 20:38:02 +00:00

Obsidian Spoiler Plugin

An Obsidian plugin that lets you hide and reveal sensitive text in your notes with a single click. Select some text, press the ribbon button, and the selection is wrapped in a collapsible spoiler callout. Press it again on a spoiler and it gets unwrapped back to plain text.

Demo of the spoiler plugin toggling a selection in Obsidian

Features

  • Adds a button to the left ribbon (near Open daily note).
  • Wraps the currently selected text in a collapsible spoiler callout.
  • Toggling: if the selection already is a spoiler, it is unwrapped back to plain text.

Spoiler format

The plugin wraps your selection in a collapsible spoiler callout, preserving any markdown inside it:

> [!spoiler]-
> super_secret_key

In reading view this renders as a collapsed callout; click it to reveal the contents.

Usage

  1. Open a note and select the text you want to hide.
  2. Click the spoiler button in the left ribbon.
  3. The selected text is replaced with a spoiler callout.
  4. To reveal it permanently, select the spoiler and click the button again to unwrap it.

Installation

  1. Download obsidian-spoiler-plugin_v0.2.1.zip from the latest release.
  2. Unzip it into your vault's plugins folder so you end up with <vault>/.obsidian/plugins/spoiler/ containing main.js and manifest.json.
  3. Reload Obsidian and enable Spoiler in Settings → Community plugins (you may need to turn off Restricted mode first).

Building from source

npm install
npm run build

This produces main.js. Copy it together with manifest.json into <vault>/.obsidian/plugins/spoiler/, then reload Obsidian and enable the plugin as above.

License

MIT