mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
f3f46d8e05
This adds the `ext.CodeMirror.v6.init` ResourceLoader module which allows use of CodeMirror on `#wpTextbox1` without the use of WikiEditor (the 'usebetatoolbar' preference). In order for users to opt-in to using CodeMirror, we make the existing 'usecodemirror' option into a visible preference. In addition, with two preferences related to CodeMirror, we group them under a new heading 'Syntax highlighting'. More preferences may be added later to this section following T359498. When WikiEditor is not enabled, the layout of the action=edit page has the textarea as a sibling to other visible content, like `.editOptions`. Because of this, we can't simply append the CodeMirror DOM to the parent like we were before, as that would put the visible editor beneath the edit summary, Publish button, etc. Instead we rework the CodeMirror to first add a wrapper around the textarea and use that as the parent. This way, `.cm-editor` is always in the same place in the DOM as the native textarea. Line wrapping and focus/blur events are also moved to CodeMirror, as these are needed when not using WikiEditor. Bug: T190108 Change-Id: I4bc069e0d398aa7088e4f50bbd0ddda458b289c3
55 lines
2.8 KiB
JSON
55 lines
2.8 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"pastakhov",
|
|
"MusikAnimal"
|
|
]
|
|
},
|
|
"codemirror-desc": "Provides syntax highlighting in wikitext editor",
|
|
"codemirror-toggle-label": "Syntax highlighting",
|
|
"codemirror-prefs-summary": "You can learn more about this feature by reading the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:CodeMirror help page].",
|
|
"codemirror-prefs-enable": "Enable syntax highlighting for wikitext",
|
|
"codemirror-v6-prefs-colorblind": "Use colorblind-friendly scheme",
|
|
"codemirror-prefs-colorblind": "Enable colorblind-friendly scheme for syntax highlighting when editing wikitext",
|
|
"codemirror-prefs-colorblind-help": "If you use a gadget for syntax highlighting, this preference will not work.",
|
|
"codemirror-find": "Find",
|
|
"codemirror-next": "next",
|
|
"codemirror-previous": "previous",
|
|
"codemirror-all": "all",
|
|
"codemirror-match-case": "match case",
|
|
"codemirror-regexp": "regexp",
|
|
"codemirror-by-word": "by word",
|
|
"codemirror-replace": "replace",
|
|
"codemirror-replace-placeholder": "Replace",
|
|
"codemirror-replace-all": "replace all",
|
|
"codemirror-control-character": "Control character $1",
|
|
"codemirror-special-char-null": "Null character",
|
|
"codemirror-special-char-bell": "Bell character",
|
|
"codemirror-special-char-backspace": "Backspace",
|
|
"codemirror-special-char-newline": "Newline",
|
|
"codemirror-special-char-vertical-tab": "Vertical tab",
|
|
"codemirror-special-char-carriage-return": "Carriage return",
|
|
"codemirror-special-char-escape": "Escape character",
|
|
"codemirror-special-char-nbsp": "Non-breaking space",
|
|
"codemirror-special-char-zero-width-space": "Zero-width space",
|
|
"codemirror-special-char-zero-width-non-joiner": "Zero-width non-joiner",
|
|
"codemirror-special-char-zero-width-joiner": "Zero-width joiner",
|
|
"codemirror-special-char-left-to-right-mark": "Left-to-right mark",
|
|
"codemirror-special-char-right-to-left-mark": "Right-to-left mark",
|
|
"codemirror-special-char-line-separator": "Line separator",
|
|
"codemirror-special-char-left-to-right-override": "Left-to-right override",
|
|
"codemirror-special-char-right-to-left-override": "Right-to-left override",
|
|
"codemirror-special-char-narrow-nbsp": "Narrow non-breaking space",
|
|
"codemirror-special-char-left-to-right-isolate": "Left-to-right isolate",
|
|
"codemirror-special-char-right-to-left-isolate": "Right-to-left isolate",
|
|
"codemirror-special-char-pop-directional-isolate": "Pop directional isolate",
|
|
"codemirror-special-char-paragraph-separator": "Paragraph separator",
|
|
"codemirror-special-char-zero-width-no-break-space": "Word joiner",
|
|
"codemirror-special-char-object-replacement": "Object replacement character",
|
|
"codemirror-fold-template": "Fold template parameters",
|
|
"codemirror-unfold": "unfold",
|
|
"codemirror-folded-code": "folded code",
|
|
"prefs-accessibility": "Accessibility",
|
|
"prefs-syntax-highlighting": "Syntax highlighting"
|
|
}
|