penyt195 downloadsAdd customizable colors to highlights and bold text, with commands to convert styled Markdown to inline HTML.
A simple Obsidian plugin that adds customizable colors to highlights and bold text, with commands to convert the styled Markdown into portable inline HTML.
Simply add a {key} to Obsidian’s built-in Markdown highlight or bold syntax. Even if you uninstall the plugin, the text will remain highlighted or bold using standard Obsidian Markdown syntax.
The conversion commands make it easy to preserve these styles when you need to publish notes as webpages.
Demo:
(Example visualization)
=={r}red highlight==.**{b}blue text**.Use one of the supported color keys inside braces:
| Color | Key | Highlight example | Bold example |
|---|---|---|---|
| Red | {r} |
=={r}red highlight== |
**{r}red text** |
| Orange | {o} |
=={o}orange highlight== |
**{o}orange text** |
| Yellow | {y} |
=={y}yellow highlight== |
**{y}yellow text** |
| Green | {g} |
=={g}green highlight== |
**{g}green text** |
| Blue | {b} |
=={b}blue highlight== |
**{b}blue text** |
| Purple | {p} |
=={p}purple highlight== |
**{p}purple text** |
| Gray | {gray} |
=={gray}gray highlight== |
**{gray}gray text** |
You can customize the following options in Settings → Style Obmd:
| Setting | Description | Default |
|---|---|---|
| Highlight decoration | Add horizontal padding and rounded corners to highlights and exported HTML. (My preference 😀) | On |
| Red | Color used by the {r} marker. |
#fb4646 |
| Orange | Color used by the {o} marker. |
#e9783f |
| Yellow | Color used by the {y} marker. |
#e0ac00 |
| Green | Color used by the {g} marker. |
#44cf6e |
| Blue | Color used by the {b} marker. |
#5389df |
| Purple | Color used by the {p} marker. |
#be75ff |
| Gray | Color used by the {gray} marker. |
#9e9e9e |
| Reset colors | Restore all marker colors to their default values. | — |
Each selected color is used at full opacity for bold text and at 30% opacity for highlight backgrounds.
Open the command palette and run one of the following commands:
| Command | Description |
|---|---|
| Style Obmd: Convert current note styles to HTML | Convert all Style Obmd markers in the active note to inline HTML. |
| Style Obmd: Convert all vault styles to HTML | Convert Style Obmd markers in every Markdown file in the vault. |
The conversion commands skip fenced code blocks and inline code.
⚠️ The vault-wide command (Style Obmd: Convert all vault styles to HTML) modifies multiple files and CANNOT be undone from a single editor history. Back up or commit your vault before running it.
(Once the plugin is approved)
Style Obmd.main.js, manifest.json, and styles.css from the latest release.style-obmd in your vault's plugin folder: <Vault>/.obsidian/plugins/style-obmd.If you find this plugin helpful, please give me a GitHub star ⭐️ or buy me a coffee ☕️!