mediawiki-extensions-CodeMi.../resources
MusikAnimal f3f46d8e05 CM6: Add syntax highlighting preference for users without WikiEditor
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
2024-04-09 22:05:20 -04:00
..
addon/edit build: Update linters 2023-09-13 14:02:43 +01:00
dist CM6: Add syntax highlighting preference for users without WikiEditor 2024-04-09 22:05:20 -04:00
lib resources: Manage upstream CodeMirror using ManageForeignResources 2023-09-21 12:40:53 +01:00
mode/mediawiki styles: Replace error color with #d73333 2024-03-11 22:03:30 +01:00
modules/ve-cm Remove useless @copyright tags from VE code headers 2023-12-18 17:01:58 +00:00
.eslintrc.json CodeMirror6: add new modules, feature flag, and URL query parameter 2023-10-09 19:51:24 -04:00
ext.CodeMirror.js Convert applicable ResourceLoader modules to use packageFiles 2023-08-24 11:55:13 -04:00
ext.CodeMirror.less CM6: move more Extensions to CodeMirror so they don't require WikiEditor 2024-03-19 22:48:17 -04:00
ext.CodeMirror.v6.less CM6: Add syntax highlighting preference for users without WikiEditor 2024-04-09 22:05:20 -04:00
ext.CodeMirror.WikiEditor.js Remove dependency on jquery.ui from CodeMirror 2024-03-18 22:19:08 +00:00