Element-web: Warn users if markdown is going to kick-in on their message, and give a nice UI for disabling it if desired

Created on 9 Dec 2015  Â·  13Comments  Â·  Source: vector-im/element-web

This was originally https://github.com/vector-im/vector-web/issues/439.

Conversely, we could warn the user that their message contains markdown, and they should turn it on when desired.

UI-wise... um.... this could be a toggleable plinth that appears at the RHS of the input box? Or at the RHS of the the status area above the input box? The latter is probably nicest. We probably want regexp-based heuristics to guess about presence of markdown rather than to run markdown on the message every time you press a key.

Community PR feature p2 composer uux

Most helpful comment

I would also greatly appreciate having a way to disable Markdown besides /plain.

A lot of the time I don't need it, I _do_ need to type a literal *, and putting /plain at the beginning of every single message gets old _fast_ – besides the fact that you can't do that when editing existing messages.

All 13 comments

A toggle on the RHS of the status area would be confusing IMO: one might wonder to what it applies. I think it should be in the text input box.

A small icon like in here would be nice, much smaller than the attachment/call ones, literally similar to the one here:
image

Ideally, if we had a few of them, I would have them displayed as a column before the attachment one. But with one only it would look a bit strange. The other option would be to display it above the text being typed.
In any case I agree it should be displayed only when markdown is detected.

I haven't ever felt the need for this feature in a RT/MD composer world. Do we still want it?

/me raises lampholder's question again: do we still want/need this?

/me raises lampholder's question again: do we still want/need this?

Yes people still want this

Screen Shot 2020-01-17 at 4 18 58 PM

please have options to disable markdown, perhaps in the settings there can be a option to choose which to defaults to, and have both /plain and /md for temporary choosing one

I would also greatly appreciate having a way to disable Markdown besides /plain.

A lot of the time I don't need it, I _do_ need to type a literal *, and putting /plain at the beginning of every single message gets old _fast_ – besides the fact that you can't do that when editing existing messages.

The default input method on RiotX (Android) also seems to be plain text only.

Ah, my bad, the Markdown formatting is behind a preference option on RiotX, but I had disabled it long ago.

I really have a hard time sometimes with Riot....

I type long messages frequently, and sometimes put multiple line breaks to separate paragraphs, for better understanding.
I may use enumeration, such as "1. 2. etc",
small separators like "--", and so on.

I still cannot understand what exactly decides whether all multiple line breaks will be ignored or not (converting into 1 line break with a slight margin between paragraphs).
Or, sometimes just Editing the message changes it again (either makes it the way I wanted initially, or reverts).

Sometimes I'm forced to put dots "." in every line break, to make sure the spacing that I want is respected.
However, sometimes formatting I never asked for is added for some reason, like making a whole paragraph a Heading, just because Riot decides to add "##" to the beginning of the line.

Seriously.... please stop Riot being obtrusive in the way we type.
If I want markdown, I can enable markdown.
But I really just want plain text...

Also, I think it's really not good that Riot actually makes replacements to my original text.
When I see the mess Riot did, and I go Edit my message, I see formatting/characters that I did not type myself.
E.g. from "1)" to "1.", or the "##" added like I mentioned above.

--

After reading this thread, I'm aware now that I can use the "/plain" command.
However:

1) It's really inconvenient having to add that to every message

2) I didn't even know there were commands on Riot... It's not a good UX when users are "supposed to know" this kind of things exist.

Would y'all be cool with a setting for this? I haven't changed anything UI-wise in the composer. I personally think we should keep this in the settings, as people wanting to disable Markdown seem to be in the minority.

image

Submitting a PR soon ;-)

Would y'all be cool with a setting for this?

Thanks! Can I just confirm with you what will this setting do?

1) Disables format in the messages we see, whether our own messages or other people's messages, while other people will see our messages formatted by Markdown

or

2) Disables format in our own messages sending to others, and others will NOT see our messages formatted with Markdown, but we see other people's messages formatted by Markdown, if they have this option disabled

@nunoperalta it just disables any and all Markdown you send.

For example, **a** would literally show up as **a** for other people.
Any Markdown messages sent by other people would be formatted in the client.
This is in line with the issue:

that their message contains markdown,

I could change the message to "Format your messages with Markdown"? Anyway, HMU in #element-dev:matrix.org (happy to chat and explain) or the PR if you have any more questions :-)

it just disables any and all Markdown you send.

Perfect! That's exactly what I'm looking for here :)
Thanks very much for that. This will be a life saver in many scenarios...

"Format your messages with Markdown"

This would likely clear any ambiguity! It would be better, in my opinion.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings