telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.23k stars 5.01k forks source link

Support Quotes using Telegram's Markdown Syntax #27772

Open JosXa opened 3 months ago

JosXa commented 3 months ago

Is your feature request related to a problem?

Most other text formatting options have corresponding markdown formatting symbols you can use as alternatives to hotkeys and the context menu. Quotes apparently do not.

Highlighting text to be affected by the hotkey and the context menu both take more time and effort than necessary, while typing Telegram's variant of markdown becomes very convenient with practice.

Describe the solution you'd like

Quoting some arbitrary text should be possible using the > ... syntax at the beginning of one or consecutive lines:

image ⬇️ image

This should have the same effect as using the context menu: image


I shall put it up for discussion whether the quotation symbol must be used in otherwise empty lines to achieve multiline highlighting, i.e. should image result in image or image ?

Describe alternatives you've considered

Creating a userbot to apply the formatting entities for me.

Additional context

I'd suggest to make the regular expression work only on the beginning of each line, meaning naively something like ^(>|\>)(\s?)(.*$). This doesn't handle multiline quotes correctly yet.

KyLeggiero commented 2 months ago

I support this fully and find it appalling how this doesn't exist on any official client.

They could even double it up like all the existing formatting (except inline code) and use >> for quotes

**bold**
__italic__
~~strikethrough~~
||spoiler||
>> quote
`code`

Fits right in.

Oddly this points out to me there's nothing for underline and links. I'm not itching for those, at least. Quotes feel much more appropriate for markup anyway

hexus commented 2 weeks ago

Funnily enough, I just found myself trying to do both > and >> to quote and it didn't work, so I searched it and ended up here.

+1, yes please! I think the doubled up >> characters would probably make the most sense, considering all of the others, as mentioned above.