Search code examples
macosmarkdowntelegram

Where i can find a list of all supported markdown features for telegram?


I am discovering markdown support in telegram and currently cant find full info anywhere.

I can see here that there is a lot of entities that telegram supports, but i can't find any syntax for most of these. Actually, default url markdown syntax does not work, so i assume there must be a different syntax. And there is a lot more, like spoiler or blockquotes, for which i can't find telegram syntax. Where can i find any docs for it?


Solution

  • Take a look at API formatting options. There are two modes, legacy mode:

    *bold text*
    _italic text_
    [inline URL](http://www.example.com/)
    [inline mention of a user](tg://user?id=123456789)
    `inline fixed-width code`
    ```
    pre-formatted fixed-width code block
    ```
    ```python
    pre-formatted fixed-width code block written in the Python programming language
    ```
    

    V2 mode:

    *bold \*text*
    _italic \*text_
    __underline__
    ~strikethrough~
    ||spoiler||
    *bold _italic bold ~italic bold strikethrough ||italic bold strikethrough spoiler||~ __underline italic bold___ bold*
    [inline URL](http://www.example.com/)
    [inline mention of a user](tg://user?id=123456789)
    `inline fixed-width code`
    ```
    pre-formatted fixed-width code block
    ```
    ```python
    pre-formatted fixed-width code block written in the Python programming language
    ```