发大胆&在html电报机器人上的斜体文本 [英] send bold & italic text on telegram bot with html
本文介绍了发大胆&在html电报机器人上的斜体文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在电报中创建了一个bot
I've created a bot in telegram
我想用HTML页面发送粗体和斜体文本到bot
I want to send bold and italic text with HTML page to bot
我的HTML代码是:
My HTML code is:
<html>
<head><title>Telegram</title></head>
<body>
<form method="GET" action="https://api.telegram.org/bot(token)/sendMessage">
<input type="hidden" name="chat_id" value="@testadminch">
<input type="hidden" name="parse_mod" value="markdown">
<textarea name="text"></textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>
如果我发送 * bold *
输出应该是粗体,但它不起作用
If I send *bold*
the output should be bold but it doesn't work
推荐答案
有两种可能性: bold
- 将
parse_mode
设置为markdown
并发送* bold *
- 设置
parse_mode
到html
并发送< b>加粗< b>
- Set the
parse_mode
tomarkdown
and send*bold*
- Set the
parse_mode
tohtml
and send<b>bold<b>
它的名字叫做parse_mod e 。
And it's called parse_mode with an e.
这篇关于发大胆&在html电报机器人上的斜体文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文