Separated out form T259673:
Behavior
When someone does the following:
- Writes a comment in the tool's source mode that contains any combination of a table, template or extension
- Attempts to switch to the tool's visual mode
Desired
- ✅They should see a dialog that says:
Dialog title | Dialog body |
---|---|
Visual mode disabled | Sorry, switching to visual mode is disabled because the syntax below was detected in the comment you have written. [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
- ❗️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 it as a new message rather than as an edit to an existing one.
Done
- "Desired" behavior is implemented