This legacy CM5 test has always been flaky and is now consistently
failing. It can be reinstated with T357482, or not at all, seeing as
bracket matching is a core extension in CodeMirror 6 and probably
doesn't need a dedicated test on top of what's upstream.
Change-Id: I77362c1c47be902cc888682aae926154470f1a56
In Idc0abb64eb we added support for 'encapsulateSelection' and multiple
cursors, but broke other jQuery.textSelection functionality in the
process. In this commit, we move the logic to a dedicated class, and
more fully and accurately mimic the native implementation.
All functionality in WikiEditor should now be supported.
Bug: T359671
Follow-Up: Idc0abb64eb036fa4a60382aca401d1dba1722405
Change-Id: I9b947d80616bd4c4372b981b2271a281d1fc0252
This patch adds an icon displayed above the cursor inside a template. By clicking it, the template parameters become hidden and replaced by three dots, while the template name remains visible. Clicking the dots will unfold the template. New key bindings include fold (Ctrl-Shift-[/Cmd-Alt-[), unfold (Ctrl-Shift-]/Cmd-Alt-]) and unfoldAll (Ctrl-Alt-]).
Bug: T30684
Change-Id: I631fe0ecf21d0a80306bd40d66d22478a1aefe58
Popular extensions like Charinsert use this method to wrap text around a
selection. This patch adds support for multiple selections in CM6.
Some options to encapsulateSelection do not yet have explicit support
here, such as 'peri', but it's unclear if they are truly needed.
Bug: T211205
Change-Id: Idc0abb64eb036fa4a60382aca401d1dba1722405
This was working before somehow… but according to the CodeMirror docs,
it never syncs with the textarea automatically, so regardless this is
a necessary safeguard at least.
Repro steps:
1) Have CodeMirror turned on
2) Open a page for editing
3) Add content
4) Toggle CodeMirror off
With this patch, it should now always be synced.
Also add selenium test to ensure this doesn't break again.
Bug: T317243
Change-Id: Ie44e62fe5838bf32f40c6a3595ec3f541380cfe1
Includes a bit untangling of the setup. Concurrent tests should not
overwrite each others user settings so one of the tests gets it's
own user.
Bug: T337862
Change-Id: Iae245063932d4c5d9e6b61c1fe102505d70c1039
* What we care about is the <pre>. The class="CodeMirror-line" is
added to every <pre>. We don't really learn anything new when we
include it in our tests.
* Testing the ARIA role is testing a CodeMirror feature, not a
feature of the mediawiki mode under test.
Change-Id: I33bfedb304228240c4e835cc983117668c398c61
Adds a custom class for matched brackets to allow better integration
with custom bracket styles. The brackets won't be bold in the 2017WTE.
Bold font might lead to misalignment there. See ticket.
Note: box-shadow seems to be supported for quite some time by all
relevant browsers
Bug: T270926
Change-Id: Ica1e301f63a106a96db3bfaba4b2f322af64b009
Basic tests to show that the highlighting classes have been attached
to the expected elements.
TODO in later patches:
* tests for the wikitext 2017 editor
Bug: T270240
Change-Id: I01ebd9881d38dd877f19ee3bb4fdcbb74d43afaf