Alert Extension
The alert extension provides the "alert" command, which provides a mechanism for making alert boxes to highlight important items within the markdown text. The available configuration items for this extension are provided in Table 1.
Key | Default | Description |
---|---|---|
use-title-prefix | True | Enable/disable including the brand (e.g., ERROR) as prefix for the alert title. |
Basic Alert
There are three versions of alerts—error, warning, and note—all of which are demonstrated in Example 1. The available settings for the alert command are listed in Table 2.
Key | Default | Description |
---|---|---|
prefix | None | Enable/disable the title being prefixed with the alert brand. |
style | The style settings that are passed to rendered HTML tag. | |
title | None | The optional alert title. |
class | The class settings to be passed to rendered HTML tag. | |
id | The class settings to be passed to the rendered tag. |
!alert error
This is an error alert.
!alert warning
This is a warning alert.
!alert note
This is a note alert.
This is an error alert.
This is a warning alert.
This is a note alert.
Alert Title
Example 2 demonstrates the use of title setting within the !alert
command, which can contain inline markdown (see Core Extension:Inline Content).
!alert warning title=This +is+ an =error=.
Do not do this, *it is bad*, umk.
Do not do this, it is bad, umk.
Block Alert
The previous examples show the inline version (see Core Extension:Inline Content) of the alert command. Since, this command was built using the Command Extension there also exists a block version, which is demonstrated in Example 3.
!alert! note
> This is a block version
> that allows the use of
> block markdown syntax
> to be used.
!alert-end!
This is a block version that allows the use of block markdown syntax to be used.
Alert without Title
It is also possible to create an alert without a title, which may be useful for simply highlighting regions of text, this is done by ommitting the title as well as setting the 'prefix' setting to false, as shown in Example 4.
!alert note prefix=False
This is an alert without a title,
which might be useful for highlighting text.
This is an alert without a title, which might be useful for highlighting text.