After 79ccfb9372cb57afa569036ef39ead13abfba673, MediaWiki's `<pre>`
tags get rendered as `<pre typeof="mw:Extension/pre">` in Parsoid HTML.
MediaWiki's indent-pre syntax (block indented by a single space) is
still rendered as `<pre>` in Parsoid HTML, however.
Indent-pre is still handled by MWPreformattedNode (no changes).
Introducing MWPreNode, which will handle `<pre>` extension tags,
and MWPreDialog to change its contents (and allow converting
to MWPreformattedNode).
Pieces copied from MWGalleryNode, MWLinkNodeInspector, CommentInspector.
Possible future improvements:
* Add a specific icon for MWPreContextItem
* Avoid API roundtrips for rendering (but rendering wikitext <pre>
is not as simple as it looks)
* Consider a way to insert these other than '<pre' sequence
Bug: T159900
Change-Id: I5bc4ea6e5d893736f65ef0dd43b08c18cb1a1e85
A gallery tag is parsed line by line, so captions
(and other image data) should not contain line breaks
Bug: T153373
Change-Id: Ib1d1c18216d07c83b2d4358d2dda71c9d17e3e44
New changes:
f1297b8 [BREAKING CHANGE] Allow target widgets to be re-used
Local changes:
Re-use target widgets
Change-Id: I5decb918f398704d4b6c108a16fbc1cc073ef077
Change I94f4fadd84cd3e prevents the gallery dialog from inserting
duplicate images into the gallery dialog after one request (e.g.
so double-clicking on an image in the search widget doesn't cause
the image to be inserted twice). However, galleries can
intentionally contain duplicates of the same image, so it is
possible to make a spearate request to insert a duplicate image.
When the dialog is first opened, it requests all the images in
the gallery at once, so the above change was causing the
duplicates in an existing gallery to be dropped. Duplicates
should be allowed to be inserted following this initial request.
Bug: T150894
Change-Id: I34353bc9b8db947488474c4be52292e0a1447705
require bypasses Ace's internal loadModule() logic which is capable of
on demand loading of Ace modules. Because unloaded modules are not
defined, they cannot be required, and because we don't use RL to preload
all modes (because it's a lot of bytes), currently only very few of the
available language modes were currently available.
Also validate language mode names passed to Ace.
Bug: T148518
Change-Id: I82d278920695be12aa80a79548abf8b8ce5445fd
Quick fix to the problem that searching for the file name or
page title currently returns the image, but searching for the
URL does not.
Bug: T121354
Change-Id: I13e665226e5dc15ba626126dc4806ce8f4e0040b
Always use #getQueryValue which trims whitespace, so we
don't pass whitespace to the API.
Also rename some variables for clarity, and remove some
unused arguments.
Change-Id: I0d27f59488295bc1c398d0fd287e3e16a3f5aaec
Configure the basePath for Ace, so that its own loader knows from where
to lazy-load additional resources. This will enable all known modes and
the worker scripts for linting.
Bug: T124419
Change-Id: Ie71518917ab966743e8397b23ffb050ca47e9ff4
If internal link detection is in the LinkAnnotationInspector, it falls down
when a valid URL which isn't also a valid page title (e.g. percent-encoded
titles) is pasted into the input. This is fixed by moving the detection to the
input's change handler before any validation can occur.
Bug: T119431
Change-Id: I1eb2040dd918fdcc22c28594b5cbad835cf384a8
Make new graphical interface for editing existing
galleries and adding new galleries.
NB The dialog does not yet support rich text in the
image captions, nor does it provide separate fields for
e.g. link, alt text, etc. These are dependent on parsing
the text within the tag, which is yet to be implemented
by Parsoid. For now, these attributes should be
specified in wikitext in the image-specific caption
field.
Bug: T45037
Change-Id: I2b4082e991268241a15b9bbd6d85c94cdc2185f2
Otherwise we just record undefined as the original sort key and never
allow blank sort keys.
Bug: T92632
Change-Id: I7f37a8a33c54186ec6f0f74e374c591d5428b119
* Use TitleInputWidget for wiki-page-name and wiki-template-name parameters
* Use UserInputWidget for wiki-user-name parameters
* Use a custom hacky CheckboxInputWidget child class for boolean parameters
* Borrow some ve.ui.MWExternalLinkAnnotationWidget.prototype.createInputWidget code for url parameters
* Use a TextInputWidget with multiline disabled for line parameters
Not dealt with in this commit, so fallback to existing behaviour:
* string
* number
* unknown
* content
* unbalanced-wikitext
* date
* wiki-file-name
Bug: T55613
Bug: T124734
Bug: T124736
Change-Id: If04944d64303d959e8dd605e75a175895932b788
Depends-On: I87699a93ca1b34c6d248456fcc060f584623d158
Depends-On: I5e97604f0fc24176d5e89899bf0505dc442a1a7e
Make the DOM order sensible so we don't have to
use SearchWidget's position:absolute hacks.
Bug: T129173
Change-Id: I3517e0e0cfe2ab0eee4bed7390e41710d3140eb0
For every title request, store an entry in noramlizedTitle to
avoid ever making an API request for that category again.
This prevents API requests from being fired every time a
category was moved, which in turn prevents the list from
flickering as it waits for the API request to resolve.
Also normalise the spelling of normalize to en-US/en-GB-oxendict
Bug: T127317
Change-Id: Ie26d9d60fb83981c45ff27199e38ae98e5560a28
Create a subclass for MediaSearch(Provider/Queue) and make the parent
class a more generic representation of API requests for media.
Change-Id: Iea8b90e829d532d210bfef3c96d6798c64e15eed