Formatting
trueconf.utils.formatting ⚓︎
AllMention ⚓︎
Represents an @all mention.
render ⚓︎
Renders an @all mention.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered |
Bold ⚓︎
Represents bold text.
Initializes a text container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes. | () |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as bold text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered bold text. |
Italic ⚓︎
Represents italic text.
Initializes a text container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes. | () |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as italic text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered italic text. |
Link ⚓︎
Represents a hyperlink.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Link label as plain text or formatting nodes. | () |
url | str | Link target URL. | required |
Initializes a hyperlink node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Link label as plain text or formatting nodes. | () |
url | str | Link target URL. | required |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as a hyperlink.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered hyperlink. |
Mention ⚓︎
Represents a TrueConf user mention.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Mention label as plain text or formatting nodes. | () |
user_id | str | TrueConf user ID, for example | required |
Initializes a TrueConf mention node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Mention label as plain text or formatting nodes. | () |
user_id | str | TrueConf user ID. | required |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as a TrueConf user mention.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered mention. |
Strikethrough ⚓︎
Represents strikethrough text.
Initializes a text container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes. | () |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as strikethrough text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered strikethrough text. |
Text ⚓︎
Container node for plain text and nested formatting nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes to concatenate. | () |
Initializes a text container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes. | () |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the text container using the provided decoration strategy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered text. |
Underline ⚓︎
Represents underlined text.
Initializes a text container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*body | str | TextNode | Plain strings or formatting nodes. | () |
as_html ⚓︎
Renders the text container as HTML.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | HTML representation of the formatted text. |
as_markdown ⚓︎
Renders the text container as Markdown.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Markdown representation of the formatted text. |
render ⚓︎
Renders the nested content as underlined text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decoration | TextDecoration | Formatting strategy used for rendering. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Rendered underlined text. |