Feature summary (what you would like to be able to do and where):
I would like to see syntax highlighting on View Source/protected pages.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
I wanted to try to analyze the template code of Template:Community Wishlist Survey/Proposal header but it was really hard to do because the page is protected and the View Source code does not have syntax highlighting:
So I was forced to copy and paste the code into an editor that did have syntax highlighting:
Benefits (why should this be implemented?):
Users looking at protected templates will be able to better-understand them.
Acceptance criteria
- WikiEditor should now load on read-only wikitext pages. (i.e. if you're logged out or not an admin on Beta enwiki, try https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?action=edit)
- The WikiEditor toolbar should contain only the CodeMirror toggle, and no other buttons
- CodeMirror should be enabled on page load only if the user has the preference set (via the toggle button in the toolbar)
- Logged out users always have CodeMirror disabled on page load
- The textarea is read-only, but not editable – meaning you will have a cursor and be able to do all the things you can do in CodeMirror, but you can't actually change the content.
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | https://phabricator.wikimedia.org/T301615 here |