scottTomaszewski / obsidian-inline-admonitions

MIT License
20 stars 0 forks source link

Inline Admonitions for Obsidian

This plugin will allow you to format inline codeblocks to better stand out on the page. For example, you may want to have all inline codeblocks that start with "IMPORTANT" to have a red background like this.

img.png

inlineAdmonition_1.2.0.webm

Usage

To add an Inline Admonition to your note, first [create a new Inline Admonition](#Creating a new Inline Admonition) of the desired type.

Then add an inline codeblock with the appropriate trigger text. For example, a [Prefix Inline Admonition](#Prefix Type) with a prefix of IMPORTANT will trigger when an inline codeblock starts with "IMPORTANT", like this:

Normal text `IMPORTANT - dont forget the milk!` and some more normal text

Creating a new Inline Admonition

Open the "Inline Admonition" settings and click "Create New Inline Admonition" at the top to bring up a Modal to configure a new Inline Admonition.

admonition-modal.png

Types

The Inline Admonition "Type" defines what triggers the codeblock to convert into an Inline Admonition. Current supported Types are:

Prefix Type

Prefix Inline Admonitions trigger when a codeblock starts with specific text.

Settings

Suffix Type

Suffix Inline Admonitions trigger when a codeblock ends with specific text.

Settings

Contains Type

Contains Inline Admonitions trigger when a codeblock contains specific text anywhere within it.

Settings

Notes

Future work

Known Issues

Development

See the changelog for changes

Build

Release

Upload the files manifest.json, main.js, styles.css as binary attachments