This is not trivial because Ace selections are
[column,row] tuples, so we need to translate to
one dimensional offsets.
Change-Id: I901b025b3747d61c74f49038fe4a65ed75758211
Ace is clever about not updating the rendering of elements
which aren't visible, so allow users to force an update, for
example if they changed the value while the whole widget
was hidden.
Change-Id: I7bbbffd17489bc80fe5fa80911f29d7223e125a3
VisualEditor is usually not enabled in talk namespaces... but
sometimes it is. And when users see the button to edit with VE,
they're going to click it and expect to be able to sign their posts.
This tool is only loaded on talk pages and pages in additional
namespaces defined in $wgExtraSignatureNamespaces.
Code adapted with small tweaks from my own gadget
<https://meta.wikimedia.org/wiki/User:Matma_Rex/visualeditor-signature.js?oldid=13461327>,
which is already available under the MIT license.
Changes include:
* The tool is now always visible if the wiki allows signatures in any
VE namespaces, but disabled when not allowed in the current namespace.
* Register '~~~~' sequence to insert the signature.
* Code style tweaks for stricter lint checks in this repository.
* Documentation corrections.
Swedish translation provided by André Costa (already credited
as a translator as Lokal_Profil).
Depends on changes in VisualEditor core:
* I89fe53890ab59d12260ea6b41de802c38c24e8b9
* I14cd7efac521687ea38580341ae08ddc522edeeb
Bug: T53154
Change-Id: I6be5fb2118cf3eef5098d4c5320228aa81411ccb
If you create an autolink in the middle of bolded text, the magic link
should also be bolded. Similarly, if you convert a bolded simple link
to a magic link, the magic link should stay bolded.
Change-Id: I38c7f3c0c275851049088a37f3b37d815ed38e4e
New changes:
95589a6 test: Add a Rakefile for new CI requirement
1a4497e ve.ui.DialogTool: Do not require that a command is set
cbf1bff ve.ui.Tool: Fix documentation for getCommandName
530022d Localisation updates from https://translatewiki.net.
9529093 Update OOjs UI to v0.13.2
b8d6c15 Add icon: Rename 'insert' to 'add'
2f3015b Update OOjs to v1.1.10
78ceb18 Fix deletion inside a structural node at start/end of document
ce3e9a4 ve.utils: Use binarySearch from OOjs
Local change:
* MW test cases for new structural deletion logic
Bug: T52250
Change-Id: I643449c1fa08ea12c8c3aa13f4a4b97d8876990d
Ensures that these styles are loaded *after* OOUI by making
them dependent on it, unlike DesktopArticleTarget.init
which isn't.
Change-Id: Ia1fff16432d20fb56707c5e21c6a930d2478e311
No point showing the icon if we don't have the functionality to
make it do anything. Also this reduces the number of RL requests
made as we never fetch OOUI separately.
Change-Id: Iac9aa6f34c485223e73981b3377c7d0cfd31dae9
Work around RESTBase problem that causes errors if we try to switch to
VE when the wikitext is empty. This would prevent non-power-users from
opening VE entirely.
This only solves the issue for new empty pages, and not when the user
intentionally empties the edit box. In that case, though, they get a
dialog where they can choose to "keep" or "discard" changes, and
discarding lets you open the editor.
Bug: T118152
Change-Id: Ie808bcaa9826deacac392dd6cbc90a9446602b79
This wasn't as bad as T112401 (that was blocking render), but we
still shouldn't be loading the module on page views.
Bug: T118088
Change-Id: If86701ed7ff4e8d6defb1c682aa9a38c211be0fa