Page MenuHomePhabricator

Allow wikitext (with highlighting) in Talk messages
Closed, ResolvedPublic

Description

At the moment our Talk message fields support only plain text. We should explore making those fields support the same level of wikitext + syntax highlighting, which we have in the general editing screen, and show the same toolbar of wikitext buttons on top of the keyboard.
(We can show the toolbar only for certain types of users, if necessary.)

In principle this shouldn't be too difficult, except for one technical issue:
In the Talk message field, we support @-mentioning usernames, which turns the username into a special Span object. This would be mutually incompatible with wikitext highlighting.

One possible solution would be:
After completing the action of @-mentioning, instead of creating a Span object, just output the resulting wikitext that corresponds to the @-mention. This is actually what the DiscussionTools interface does (in the Source editor, not Visual editor).
So, instead of adding @Dbrant to the message, it would become @[[User:Dbrant|Dbrant]] , with the cursor placed at the end of the insertion, as before. And if we introduce syntax highlighting, the latter username link would become automatically highlighted.

Event Timeline

Dbrant triaged this task as Medium priority.
ABorbaWMF subscribed.

@ mentions seem to be working. I noticed some other issues with test wikitext:
T348196
T348195
T348194
T348193
T348191
T348190
T348187
T348185
T348169
T348168
T348171

However, none of these seemed major, so I moving this ticket on to signoff for 2.7.50453-beta-2023-09-25