An Excalidraw script for Obsidian that instantly transforms any selected text into a terminal-style CTF flag — complete with a 🚩 prefix, Terminal Green color, monospace font, and a sleek black rounded box.
Select your CTF flag text element (or its bounding box) on your Excalidraw canvas and run this script. It will:
| Feature | Result |
|---|---|
| Prepends flag symbol | 🚩 added to your text |
| Text color | Terminal green #00ff00 |
| Font | Monospace (Code font) |
| Alignment | Center |
| Box background | Solid black #000000 |
| Box border | Green #00ff00, 2px, rounded |
| No box? | Automatically draws one around the text |
In your Obsidian vault, find the Excalidraw folder. By default it is at:
YourVault/
└── Excalidraw/
Inside the Excalidraw folder, create a subfolder named exactly.
Your vault structure should now look like this:
YourVault/
└── Excalidraw/
└── Scripts/
Copy both files from this repo into the Scripts folder:
YourVault/
└── Excalidraw/
└── Scripts/
├── CTF Flag Highlighter.md ✅ (the script)
└── CTF Flag Highlighter.svg ✅ (the toolbar icon)
- The
.mdfile contains the actual JavaScript — do not rename it to.js.- The
.svgfile is the thumbnail icon shown in the Excalidraw script toolbar. It must share the exact same name as the.mdfile.
- Open any Excalidraw drawing in Obsidian.
- In the Excalidraw right-side toolbar, click the Obsidian Tools Panel (it has the Obsidian logo as icon).
- A panel listing all your scripts will appear.
- Click
CTF Flag Highlighterto run it on your selection (you can find it using the flag thumbnail icon).
- Select your text element(s) on the canvas.
- Open the Command Palette (
Ctrl+P/Cmd+P). - Type
CTF Flag Highlighterand press Enter.
Note: Scripts only appear in the palette/toolbar after Obsidian reloads or detects the new file. If the script doesn't show up, reload Obsidian once (
Ctrl+R/Cmd+R).
1. Open an Excalidraw drawing in Obsidian
2. Type or select a text element containing a CTF flag
3. Select the text element (or its box) on the canvas
4. Run: CTF Flag Highlighter (toolbar or Ctrl+P)
5. Done — your flag is now styled! 🏴☠️
- Obsidian (any recent version)
- Excalidraw Plugin for Obsidian — install from Settings → Community Plugins
Made by pramodexe 🏴☠️
This project is free to use — no restrictions, no attribution required.
Do whatever you want with it. Hack, modify, share, or build on top of it. 🏴☠️