AlertTitleConfigs
ClassDataClassSource
AlertTitleConfigs(
note: str = "quote",
tip: str = "quote",
important: str = "b",
warning: str = "u",
caution: str = "spoiler",
tag_b: str = "b",
tag_i: str = "i",
tag_u: str = "u",
tag_strike: str = "strike",
tag_spoiler: str = "spoiler"
)
The translation list of alert box titles.
Each field name will be interpreted as an allowed alert box title in Markdown. For example, users can write
> [!note]
> A example of note box.
which will be interpreted as
[quote]
A example of note box.
[/quote]
if AlertTitleConfigs.note == "quote".
Any alert box title that are not defined in this list will be interpreted as quote when rendering BBCode.
Fields
| Name | Type | Required | |
|---|---|---|---|
note | str | The tag used to render the alert block with the type: note. | |
tip | str | The tag used to render the alert block with the type: tip. | |
important | str | The tag used to render the alert block with the type: important. | |
warning | str | The tag used to render the alert block with the type: warning. | |
caution | str | The tag used to render the alert block with the type: caution. | |
tag_b | str | The tag used to render the alert block with the type: tag_b. | |
tag_i | str | The tag used to render the alert block with the type: tag_i. | |
tag_u | str | The tag used to render the alert block with the type: tag_u. | |
tag_strike | str | The tag used to render the alert block with the type: tag_strike. | |
tag_spoiler | str | The tag used to render the alert block with the type: tag_spoiler. |
Methods
render_title_as_tag
v_1: str | None = self.render_title_as_tag(title: str)
Given a title specified in AlertNode, get the appropriate BBCode tag for it.
Requires
| Name | Type | Required | |
|---|---|---|---|
title | str | Given the title of an alert block, and use it to find the tag. |
Returns
| Name | Type | |
|---|---|---|
v_1 | str | None | The returned tag. This method may return |