Webogram: Add markdown formatting, mainly for code

Created on 12 Mar 2014  路  41Comments  路  Source: zhukov/webogram

Add the ability to markdown text, or at least just specify that you want certain code text to be displayed as monospace. Nicer would be to have full markdown and other rich formatting. Language detection and syntax highlighting would be super cool.

Most helpful comment

:+1:
Gitter.im has this

All 41 comments

The problem is that how is the other side supposed to handle the formatting? If it's not supported by the API, it's not possible.

I don't get your last part. What "language detection" and "syntax highlight" would be for? It's a chat, not a code editor.

In my opinion code should be shared with services like Pastebin, Pastie, Gist etc. Syntax highlighting is not supported by other Telegram clients, not needed by most users and will make app slower.
I think, that's a task for browser extension, not for Webogram itself.

In android client have same issue for make markdown in client https://github.com/DrKLO/Telegram/issues/398

:+1:
Gitter.im has this

I think need implement this

I would use this, also.

+1

If you want to see Markdown in Telegram clients across the board, message Telegram Support. They can pass it on to the core dev team.

Markdown is a text based readable formatting syntax. It means that people reading your markdown on non markdown compatible telegram clients will understand your message without problem.

Heck, I even forked webogram to add this feature.
And I didn't know angular.
My point here is that, if the webogram team wants to implement it, it's quite easy.
And there is no need to update the telegram protocol.

@alexgarbarev what code are you sharing in IM? Do you use text snippets from Slack?

@PerfectCarl commented on May 19, 2015, 7:25 AM PDT:

And there is no need to update the telegram protocol.

I'm not saying that the protocol needs to be updated鈥攋ust that the core team should be notified so the addition can be coordinated over all the main apps.

+1. Also some subset of LaTeX math will be a great and unique feature.

+1, This is great idea

+1

+1

+1

:+1:

+1

+1

+1

+1

Everyone, you can stop +1'ing. Look at the above commit. He added basic markdown formatting.

How do I use it?

yeah... just follow gittem.im

+1

I've just tested with the web interface it works, both inline foo(x) = :x and block syntax

function foo(x)
    :x
end

Without syntax highlighting:

foo

I forgot my smartphone (android) at home, but last time I checked it didn't work there.

@Ismael-VC Doesn't work for me with your code. Do I need to activate it manually?

@Phisherman I haven't activated anything, it's the first time I use the web interface, just use normal markdown syntax for code snippets there.

foo1

That produces the last example output.

@Ismael-VC Now it works. I forgot the tick marks. Thanks!

I just tested with my android and it doesn't work there.

Works for me (on https://web.telegram.org)

I just installed the windows client and it doesn't work either, I can't test in other platforms now.

It works only on https://web.telegram.org/...

@Ismael-VC See @zhukov's original response:

@zhukov commented on Mar 12, 2014, 3:11 PM PDT:

In my opinion code should be shared with services like Pastebin, Pastie, Gist etc. Syntax highlighting is not supported by other Telegram clients, not needed by most users and will make app slower.

I think, that's a task for browser extension, not for Webogram itself.

He added this in as an extra feature due to so many requests. If you want it in Telegram apps proper, ask Telegram support.

For now this is an experimental feature, supported in Web app. Other clients are not guaranteed to support it. If you like it and want to be supported in other apps, contact corresponding apps' developers (not me).

Not support simple markdown like *Hello*, only support code?

Yep. Just inline code and

block code

````` inline code`

block code

``````

+1

@zekefast Already implemented; please read the thread.

@bb010g Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tdimdimich picture tdimdimich  路  7Comments

cbrwizard picture cbrwizard  路  5Comments

iagocavalcante picture iagocavalcante  路  8Comments

davidtaubmann picture davidtaubmann  路  5Comments

LulzRose picture LulzRose  路  6Comments