Steps, so that others can know how to upgrade later:
* Alter entry in package.json and run `npm i` and then `npx grunt update-ace` to update.
* Test locally for CSS, JS, and JSON pages (as the most-affected types).
* Verify code diffs and add to git staging manually.
* Update foreign-resources.yaml entry manually.
Bug: T342387
Change-Id: I3566e8271ce37807f7d24867680d8229aa97302c
Also move to modules/lib/ like in other repos. As we're using the build
step rather than a direct release, let's leave it as doc-only, but this
at least makes the process more clear.
Also add the README.md and CHANGELOG.md files like we do for others.
Change-Id: I3566e8271ce37807f7d24867680d8229aa97302b
Style the textbox to mimic when CodeEditor is enabled only if
"usecodeeditor" is set, and only before CodeEditor is loaded (I0ce663e
added a gutter even when CodeEditor was turned off, which no one asked
for).
.wikiEditor-ui-text is added client-side, so there's no point in styling
it.
Bug: T351487
Change-Id: I3918e1c120805ca007e8e7eb7e29304ddbb6af56
On tab close on Firefox there is a 'discard your changes?' dialog.
On preview the cursor/scroll position is still on the same position.
Just the focus is not in the textarea, but this in WikiEditor, too.
Change-Id: I0d7b59c39381cdc7da72c0a6c366d74071f7ef54
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I2af14da0c4f2d13e94b0301ae5d4d2589e05f0b7
When the Edit Recovery loading process is finished, add an Ace
editor change handler so that the Edit Recovery fields are saved
whenever there's a change to the CodeEditor data.
This is similar to the change made for CodeMirror:
I352470752130c7b9b2dfc55a066cecf785d40067
Bug: T344406
Change-Id: I2c7826379108a88be7956d84bbfd3200b5ad542f
It was pointed out in the review of Ie3ed681b that the naive fallback
for replaceSelection() was not working because CodeEditor only had a
stub getCaretPosition() implementation. So, let's implement that as well
in case people want to use it. It seems to work reasonably well locally
with the native replaceSelection() disabled.
Bug: T342127
Change-Id: I8d3683808394faefa56c7cdff31dc18978c4dd92
The $.textSelection() facade in CodeEditor is missing a
replaceSelection() implementation. This causes $.textSelection() to
fall back to a naive implementation, which does not work, thus breaking
any gadget or extension that tries to interact with CodeEditor using
this method. As a fix, provide a native replaceSelection()
implementation that calls the appropriate ACE editor method:
Bug: T342127
Change-Id: Ie3ed681b39c5d4d2bed50030a397a2b1c877c9fb