Separated out form T259673:
=== Behavior
**Desired**//When someone does the following://
`Sorry, switching to visual mode is disabled because the syntax below was detected in the comment you have written1. [Learn more](mw:Extension:DiscussionTools/Reply_tool_visual_mode_limitWrites a comment in the tool's `source` mode that contains **any combinations).** of a table, <ul> <li>Extension</li> <li>Table</li> <li>Template</li> </ul>`
Where the list is generated based on which syntax was detected.
**Existing**template or extension
Currently we only show one disallowed syntax type (in the order of table/template/extension),2. as we assume most of the time there will only be one type present.Attempts to switch to the tool's `visual` mode
**Desired**
3. ✅They should see a dialog that says:
|Dialog title| Dialog body|
|---|---
|`Visual mode disabled`| `Sorry, switching to visual mode is disabled because <b>$1</b>the syntax below was detected in the comment you have written. [https:\/\/www.mediawiki.org\/wiki\/Special:MyLanguage\/Extension:DiscussionTools/Reply_tool_visual_mode_limitations Learn more].`Learn more](mw:Extension:DiscussionTools/Reply_tool_visual_mode_limitations). <ul> <li>Extension</li> <li>Table</li> <li>Template</li> </ul>`
//Note: only the syntax that you have written in "Step 1" should in the list that appears within the `Visual mode disabled` dialog.
**Existing **
3. ❗️They see a dialog that says:
|Dialog title| Dialog body|
|---|---
|`Visual mode disabled`| `Sorry, switching to visual mode is disabled because <b>$1</b> was detected in the comment you have written. [https:\/\/www.mediawiki.org\/wiki\/Special:MyLanguage\/Extension:DiscussionTools/Reply_tool_visual_mode_limitations Learn more].`
=== Notes
- When implementing the **Desired** behavior described in the `===Behavior` section above, we should do as @Dlynch described in T263261#6474621 and implement as a new message rather than an edit to an existing one.
=== Done
- [ ] "Desired" behavior is implemented