I use a Telegram-bot for sending updates from my Home Automation. I like to do some text styling for easier reading and a quick notice of special messages. Mostly I use bold, italic or underlined text, but I discovered the pre-tag for a code block. I like to use this tag for error-messages for example.
But when I tested it I used a short text, that looked fine! Now I received a longer message and a copy-button appeared…
Below an example of a short (without button) and a longer message (with button).
I don’t like that button! I don’t want that button!
I used the same <pre>
and </pre>
tags for both blocks. So it appears only based on length I think…?
Does someone know a way to make it disapear or disable it?
2
Answers
It is not possible to remove this button at this time. But there is an alternative solution: use a pre-tag on each line. What I mean:
message:
result:
By the way, even if the string takes two/three lines, it will still work without the button.
As a workaround (I used), you can use
<code>your preformatted multi-lines paragraph here</code>
, it will not show [Copy] button in Telegram Desktop (Windows) and Telegram Mobile (Android).I don’t have clients on other platforms to test.