Using the telegram bot API, one can specify the parse_mode to HTML or Markdown/MarkdownV2. In a telegram mini-app, the native “Share” popup screen (with Chat select) can be opened as follows:
window.Telegram.WebApp.openTelegramLink(
`https://t.me/share/msg_url?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`
)
Where url
is the URL to be shared and text
is the description text accompanying it. When giving text
as **Test**
or *Test*
or <b>Test</b>
, it just gets sent/shown with the raw *
and <b>
tags/chars instead of formatting it as expected (Test).
How can one specify the formatting in this native TMA share popup screen?