Formatting messages in Telegram
Markdown markup
To apply the correct text formatting for this block, strictly follow the steps below. The markup tools are located under the message input field.

Put the required text in the response field.
If you use variables in the text, then you don't need to specify them at this stage. Otherwise, the syntax of the variables will be violated and the #{} characters will also be escaped, and the variable will not appear in the text.
Turn on "Markdown in Telegram". This way, escape characters will be added to your text.
Select the text ** or _ _, etc.
If any of the listed characters occur in this block.: '_', '*', '[', ']', '(', ')', '~', "', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' — they need to be escaped by adding a backslash in front of them. \
Otherwise, the message will not be sent at all. It doesn't matter which part of the text you mark up.
Example: hello\. Glad *to* see you\!
Special symbols:
Bold text — put asterisks on both sides: *here is the text*
Italics — underlining: _text_
Underlined text — two lower underscores on both sides: __text__
The crossed—out text is a tilde on both sides of the text: ~text~
Link in the text: [text in square brackets](link in parentheses)
[inline URL](http://www.example.com /)
Mentioning the user TG: [text in square brackets] (link to the user in parentheses). You can use #{platform_id} after the equals sign in the link.
[inline mention of a user](tg://user?id=123456789)
Text in the form of a code — put a reverse apostrophe on both sides of the text: `inline fixed-width code`
Hidden text or spoiler - use || on both sides of the text
Then place the desired text using special characters.
Example:

The result:

To use special characters literally (e.g., `, *, _, ~), you must escape them with a backslash (\). This prevents them from being interpreted as formatting commands.
Example: To display an asterisk (*), write \*.
txt = tg_escape(s), where s is the string with the source text.
To write text with line breaks to a variable, specify the value as follows:
your variable = "Text of the first line" + "\n" + "Text of the second line" + "\n" +"Third line"
A line arrives in txt with the slashes already inserted in the right places at the output.
Example:


Then mark up the desired text.
Here is an example with a long text:

To do this, use the calculator to:
Step 1. Paste your text into the message field:

Step 2. Enable the "Markdown markup" button:

When the markup button is turned on, special characters are escaped.
Step 3. Arrange special characters for formatting the message in the text:

"There is no closing symbol" - This often means a special character (like a bracket
}or quote") was not properly escaped.
Common Error Example:
If a message fails to send and you see an error in the "Clients" section, it is likely due to incorrect character escaping. The error message will typically point to the specific character that is missing a backslash (\).


Character escaping is missing:

Formatting text in the block editor for Telegram: markdown
HTML markup
To make the HTML markup work, don't forget to click on the HTML button under the text field for the message:

<a href="https://google.com ">link</a> - embeds a link in a specific word.
Example:

<u>underlined</u> - underlined font
Example:


<ins>underlined</ins> - underlined font
Example:


<em>italic</em> - italic font
Example:


<i>italic</i> - italic font
Example:


<strong>strong</strong> - bold font


<strike>strike</strike> - strike through font


<span class="tg-spoiler">hidden</span> - hidden font
Example:

<code>Prerfomatted</code> - formatted font
Example:


<pre>Preformatted</pre> - formatted font
Example:


How to enable protected mode for content
To protect the content from distribution, you can enable protected mode for messages. To do this, turn on "Protect content" in the "Message" section:

Secure messages cannot be forwarded, and you cannot take a screenshot on your phone.
Last updated