This invokes Parsoid to convert likely wikitext pastes.
This addresses about 20% of the <nowiki> insertion quantified at
https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:%C3%89diteurVisuel/Avis/Nowiki
for 2015-04-08 which were due to inadvertent pastes of wikitext.
For a better user experience, suppress Parsoid's P-wrapping if the
output consists of a single top-level P element. This ensures that
pasting '[[Foo]]' won't add an unexpected newline before the paste.
Bug: T54204
Bug: T109449
Change-Id: I26a4cd8dc5b7e7caf16ca081dbe7baf6a7db8e5c
New changes:
44f8204 Autolink pasted links
Local changes:
* Add UrlStringTransferHandler from core
Change-Id: I7eae6da2739fa47b22ed1e7fbf53e9473e037c5b
New changes:
985edd2 Localisation updates from https://translatewiki.net.
9883b44 Follow-up 985edd24: Fix build for added language 'shn'
b0d5ee2 Localisation updates from https://translatewiki.net.
18ca837 Localisation updates from https://translatewiki.net.
f6a0945 Don't include trailing punctuation in autolinked typed text
Local changes:
* Add MW-specific trailing punctuation rules for autolinking
Change-Id: Iaa620142222f47e9fde2d03b935f38c24d38800b
New changes:
61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms
e5aff79 Localisation updates from https://translatewiki.net.
a99a897 Update OOjs UI to v0.12.3
3c01a14 Make DM nodes sensibly hashable
a611eb9 Make ve.dm.example.postprocessAnnotations fluent
496c895 Update ve.dm.ElementLinearData#hasContent documentation
fcaa035 Support RegExp sequences; trigger sequence matcher after newline
edda1d4 Add a mechanism to wait until ve.init.platform has been created
e174155 Autolink URLs when typing
ac9248f Allow drag and drop of links (and subsequent autolinking)
c88fad6 Localisation updates from https://translatewiki.net.
Local changes:
* Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`.
* Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`.
* Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper
`ve.ui.MWExternalLinkAnnotation` type.
Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
Usage:
In a skin, that needs this offset, e.g. because it has a fixed header, it should add
this config var somewhere before the hook BeforeOutputPage is called:
$wgVisualEditorSkinToolbarScrollOffset['vector'] = 60;
(if 60px is the offset to use)
Depends on: I2e10c12df8277c84d948e48c6a132c03d6324693
Bug: T95528
Change-Id: Iaa86c2f68afa6403fcc4f5b7c655704512beead4
Depends on I1ba8978dd in core.
Bonus: remove not-allowed-cursor & highlight title (which was
broken) now that we can display this information properly.
Bug: T106810
Change-Id: I1800490ba1b8e10ff54b26372a8a78661c1c7d68
New changes:
950d65b Update UnicodeJS to v0.1.5
139eab2 Localisation updates from https://translatewiki.net.
801eb2d Localisation updates from https://translatewiki.net.
f002650 Localisation updates from https://translatewiki.net.
0ca48d8 Update jQuery.i18n to v1.0.3
651465a Follow-up 0ca48d8: Actually load jquery.i18n.emitter.bidi.js too
e1505f8 Localisation updates from https://translatewiki.net.
1b929e6 EventSequencer: fixes and unit tests
Change-Id: I82f420bb694c4a0d10f4a61ac07b7d0bb05ed547
Starting with I21fbbd3247bf7801e5ef9bd5312f95777f4dd6ef, Parsoid
will emit a new HTML for its Cite extension, which enables CSS
styling. In I487095df8a7c4241a14f7b4480360f6774130bec the new
module 'ext.cite.style' is added to the Cite extension to style
this new HTML format.
This patch
* Loads the ext.cite.style module if the Cite extension is
present.
* Uses the new HTML format for the internal structure of
reference and reference list nodes, so they are correctly
styled.
Backwards compatibility: Only new HTML is used internally in VE,
so as long as ext.cite.style can be loaded the new styles will be
used. It does not depend on which format Parsoid returns, so this
patch only depends on the Cite extension patch, not on the Parsoid
one.
Note: The only way I've found of adding a ext.cite.style dependency
only if Cite is present is to register the whole
ext.visualEditor.mwreference module in the
onResourceLoaderRegisterModules hook. Maybe someone can point to
a better way?
Bug: T86782
Change-Id: Ibf333a502d64d2ed6e029221458b7c606554e414
New changes:
49f66aa Localisation updates from https://translatewiki.net.
ff1250e Update jQuery Client to v2.0.0
9186ae4 Revert "Update jQuery Client to v2.0.0"
0886bf1 Localisation updates from https://translatewiki.net.
1908c66 Follow-up 0886bf1: Re-fix the build by adding the new 'cjy-hant' language
cc6e96a EventLogger: fix output duplication and add jshint format flag
1194b70 IME tests: Make compliant with our code style
fe4a7ae IME tests: Add OS X native Japanese Hiragana & Katakana
325c743 Localisation updates from https://translatewiki.net.
05788b1 Update paste target selection hack to use focusedNode text when possible
7b43b34 Set default context cursor to 'default'
5c5a80f Add #hasContent method to ElementLinearData
6625cd3 Add placeholder functionality to the surface
Local changes:
* Add new IME tests to the hooks file
Change-Id: I132ad2627c6d54236848812c404731c5c9d4183a
Non-executable files should have permissions set to 644 – touching:
ApiVisualEditorEdit.php
VisualEditor.hooks.php
VisualEditor.php
Bug: T104044
Change-Id: I73fcee410fa1d538e05a7f494871f20531665701
All link input/title input functionality has been moved to core, so
we can replace the link widget, redirect widget and template search
widget with it.
Depends on Ib463e60cad96 in MediaWiki core.
Change-Id: I452f3b86ead403307072cf904f0553c9771f4300
This module is required in order to alienate all extension blocks
by default. Otherwise they are interpreted as plain divs which
allow content editable.
Bug: T103455
Change-Id: I08f6b9a516ba6bee6ed18256222108116eceee1e
* At this point the IDs are all known so there is no need
to re-query what was written in the transaction
* This works when recent change insertion is deferred
* Also deferred tagging in ApiVisualEditorEdit to after
the RC row is saved
Bug: T100439
Change-Id: Ic4c7d8d89b8cfeee57eda867c0ff74fa9682ffc8
Instead of writing to the visualeditor-enable preference (which is
user-facing), write to the visualeditor-testabpreference one (which
is made up and won't impact anything), so that we can test that the
A/B bucketing code works as expected.
This patch will be reverted once bucketing is confirmed to be working.
Change-Id: Ia738146c5bf68795bf812d64847ba74498888cd5
Also introduces paction=metadata in ApiVisualEditor which
doesn't hit Parsoid but gets all the other information we need.
Bug: T90374
Change-Id: I71edbc0f8dc15a6f8d3672c10ca3c641cc172be7
This introduces TargetLoader, which manages plugins and RL modules
in a slightly more generic fashion so that Targets themselves don't
have to. This allows us to load all RL modules in one load.php
request, rather than first loading ViewPageTarget which then
loads the other modules.
TargetLoader loads in the bottom queue, so it will be loaded
as part of the main load.php request, but in VPT.init.js we
still have to wait for it with using() because it might not
have arrived yet. This also degrades gracefully on cached pages
where TargetLoader isn't in the bottom queue: it'll be loaded
as a separate request instead, which is suboptimal but no
worse that what we were doing before.
Right now TargetLoader is small enough that it could also be in
the top queue, but in the future we want to add things like
the action=visualeditor API request to it, and mw.Api is
relatively big.
Note: this also makes a breaking change to the plugin API:
plugin callbacks no longer receive the target instance
as a parameter, as they're now executed before the target
has been constructed rather than after. In the long term,
if we want to give plugins access to the target instance,
we could give them the target promise somehow. For now,
I've killed this feature because nothing used it and
the change from a direct object reference to a promise
would have been a breaking change anyway.
Also fixed incorrect documentation index for ve.init.mw.ViewPageTarget.init.
Bug: T53569
Change-Id: Ibfa6abbeaf872ae2aadc6ed9d5beba7473ea441a
Change I4d4043e5052327bbd789331f1c05b607c45fe7cb introduces RESTBase's
virtual REST service in the MW core, as well as $wgVirtualRestConfig,
which represents the first step towards central VRS configuration.
This patch modifies VE to use RESTBase instead of Parsoid, if
available. RESTBase's virtual REST service transparently maps Parsoid
URIs to RESTBase's, so there is no need to change them in VE for now.
Note that the patch keeps full compatibility with systems/domains that
do not have $wgVirtualRestConfig declared (or even with those that do
not include the RESTBase virtual REST service class). This allows us
to use RESTBase as the back-end only on selected domains.
Bug: T89066
Change-Id: Ie7488f64868a41f28ec24ab1217c12c6249b5523
Add the new feature for user agent checkbox for the mw.Feedback
dialog. This bumps our MediaWiki dependency to 1.25wmf20.
Change-Id: I741ded83de4f575777a15cb20735e351039dc81f
Generalize MWResourceQueue and MWResourceProvider so they are
extending the general classes from ve-core. This also allows for
tests in ve-core on the resource queue system.
* Depends on ve-core change I5346081317e *
Change-Id: If34cd99334f4ccb93015c3646f68ae3040b9c5d7
It's slow, especially on large pages, and it's triggered
very infrequently these days, and only for known bugs.
In the future we should replace this with a debugging
interface that displays the DOM diff between the original
DOM and the round-tripped DOM, as opposed to the boolean
interface we have now.
By extension, this also means the visualeditor-needcheck
tag won't be applied to new edits any more, although
its registration and messages are kept around because
edits with this tag still exist in page histories.
Bug: T87161
Change-Id: I909153492a5786b4b69fccd42ce3c1d4bdb3a059
Originally added in 5036099906.
* Account for bug T89513 for 'tempdisable' (was done for 'enable' in 9cba9910c6).
* MediaWiki core now loads user defaults in a separate module not
subject to page caching, making our workaround obsolete.
Keeping defaultthumbsize as that is intentionally ignoring the user's
preferences.
Change-Id: I07a7aa8e08c728ddeba67f36a98e989c220dcb50
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.
This is needed to have our tests (and code base) run error-free
without a MediaWiki page.
Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f