Page MenuHomestjnJan 5 2025, 4:32 PM
Tags
Referenced Files
F58325246: 5.png
Jan 31 2025, 7:00 PM
Subscribers
Tokens
"Like" token, awarded by Nemoralis.

Description

Update - New button:


Original task:

Feature summary (what you would like to be able to do and where):
Currently both VisualEditor and new wikitext editor (2017) have a button that, on pressing Ctrl+Shift+6, inserts <code> syntax into the editor. I feel like this sort of thing would also be very useful to have in WikiEditor as well, so I would like to implement it based on VE’s implementation. (Ideally, we should some day achieve feature parity between existing editors, but that’s a long way to go and would probably require rewriting WikiEditor away from jQuery dependency.)

Convenient-Discussions user script also implements this button already, where it outputs <code><nowiki>. But since <nowiki> is already possible to insert via Ctrl+\ shortcut, I feel like the better way to implement this would be to do it like in VE: just <code> with no additives unless user wants them.

Should be fairly straightforward to implement based on the existing code. Keyboard shortcut is probably harder to do but it’s not required to solve this and can be handled further in T380087: WikiEditor: Provide all useful shortcuts from visual editor.

Details

SubjectRepoBranchLines +/-