mirror of
https://github.com/patruusbarba/ObsidianSpoilerPlugin.git
synced 2026-07-22 07:48:59 +00:00
No description
|
|
||
|---|---|---|
| .gitignore | ||
| esbuild.config.mjs | ||
| main.ts | ||
| manifest.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
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.
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 callout with a fenced code block, so the content stays hidden until you expand it:
> [!spoiler]- crypto key
>```
>super_secret_key
>```
In reading view this renders as a collapsed callout titled crypto key; click it to reveal the hidden contents.
Usage
- Open a note and select the text you want to hide.
- Click the spoiler button in the left ribbon.
- The selected text is replaced with a spoiler callout.
- To reveal it permanently, select the spoiler and click the button again to unwrap it.
Installation
From a release (recommended)
- Download
obsidian-spoiler-plugin_v0.1.zipfrom the latest release. - Unzip it into your vault's plugins folder so you end up with
<vault>/.obsidian/plugins/obsidian-spoiler-plugin/containingmain.jsandmanifest.json. - 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/obsidian-spoiler-plugin/, then reload Obsidian and
enable the plugin as above.
License
MIT