Page MenuHomePhabricator

I want a way in wikitext mode to identify that a selection shouldn't be treated as wikitext
Open, LowPublic8 Estimated Story Points

Description

Current status:

  1. Type the name of a template in the wikitext mode: {{example}}
  2. Select text.
  3. Press keyboard shortcut Command-Shift-6.
  4. See <code> tags magically appear. Be happy.
  5. Press keyboard shortcut again.
  6. See the just-inserted <code> tags disappear. Be amazed at this bit of awesomeness.
  7. Search for <nowiki> item.
  8. It's not there. Type the codes out by hand. Again. Be a little bit sad.

Wanted:

  1. Type the name of a template in the wikitext mode: {{example}}
  2. Select text.
  3. Press keyboard shortcut Command-Shift-6.
  4. See <code> tags magically appear. Be happy.
  5. Press new keyboard shortcut Command-Shift-7.
  6. See <nowiki> tags magically appear inside the <code> tags. Be very happy.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Because (a) I am using VisualEditor (the wikitext mode is still part of Extension:VisualEditor) and (b) James keeps declining requests to enable the visual mode on talk pages,[1] even though these are the very pages where I am most likely to want to talk about a template rather than using it.

[1] for not completely unreasonable reasons. I grant this, but the non-un-reasonability of his thinking does not solve my problem.

<nowiki> isn't text style - it's a source mode escaping trick and has no semantic meaning.

Ed, I will cheerfully let you call it whatever you want, so long as you solve my problem. :-)

Jdforrester-WMF renamed this task from I want a nowiki item in the Character Styles menu, with a convenient keyboard shortcut to I want a way in wikitext mode to identify that a selection shouldn't be treated as wikitext.Feb 14 2017, 8:08 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF added a project: Design.
Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

If the user has intentionally chosen to use the wikitext editor, then it is generally reasonable to assume that they know the intricacies of the syntax. This is definitely a worthwhile feature, but it's a nice to have.

If you use the wikitext-editor which is not part of the Visual Editor, you have https://www.mediawiki.org/wiki/MediaWiki:Edittools or a project specific version of it like https://de.wikipedia.org/wiki/MediaWiki:Onlyifediting.js (in combination with https://de.wikipedia.org/wiki/MediaWiki:Edittools ; in the submenue "WikiSyntax") or https://en.wikipedia.org/wiki/MediaWiki:Edittools that contain <nowiki>-tags and many other. A new wikitext-editor shouldn't fall back behind the achievements of the old one.

Also, this needs a keyboard shortcut, because I need to be able to talk about wikitext in a Flow board, and I don't want to have to switch back and forth between visual and wikitext modes just to add 17 characters of what Ed calls "source mode escaping".

If the user has intentionally chosen to use the wikitext editor, then it is generally reasonable to assume that they know the intricacies of the syntax. This is definitely a worthwhile feature, but it's a nice to have.

Only if they have that experience from prior to moving to VE-WTE (which I guess a number of power users do). If you plan to offer VE-WTE as the WTE of the future (which seems to be the intent), then new users will... need to learn the intricacies of the syntax. So, your assumption has a bit of a hole in it in its generality.

FYI, there's a user script that adds this functionality (in the text style menu, named "Disable markup"). I won't help you if it breaks, though. https://en.wikipedia.org/wiki/User:Matma_Rex/nwe-nowiki.js

From Talk:Talk pages project/Replying: why not make the <code> button output <nowiki> tags at the same time? It is quite unusual to want hand-formatted code tags (e.g. <code>x<b>y</b>z</code>) so this would rarely be an inconvenience to anyone and avoids button clutter.