mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
86f2057c81
While all of the following are valid in the model: 1. <mwBlockImage></mwBlockImage> Image with no caption. Must use the media dialog to insert one. 2. <mwBlockImage><mwImageCaption></mwImageCaption></mwBlockImage> Image with empty caption. There is a slug to insert a paragraph. 3. <mwBlockImage><mwImageCaption><paragraph></paragraph></mwImageCaption></mwBlockImage> Image with caption with empty paragraph. Nice and intuitive! (Same for <mwGalleryImage> / <mwGalleryImageCaption>.) The third option is the most convenient for the user. We should always generate that when converting documents from HTML and from the editing tools (MWGalleryDialog, MWMediaDialog/MWImageModel). Previously, the editing tools generated option 2 if no caption text was entered, and the converter generated option 2 if there was no caption node or if it was empty. Curiously, option 1 was never used. Wikitext for manual testing: ``` [[File:Foo.png|thumb]] [[File:Foo.png|thumb|]] [[File:Foo.png|thumb|Caption]] <gallery mode="packed"> File:Foo.png File:Foo.png| File:Foo.png|Caption </gallery> ``` Bug: T200387 Change-Id: Ie82fb339f6bd8ae1b289235bf5402490722d9a7c |
||
---|---|---|
.. | ||
ve.ui.MWCancelConfirmDialog.js | ||
ve.ui.MWCommandHelpDialog.js | ||
ve.ui.MWExtensionDialog.js | ||
ve.ui.MWExtensionPreviewDialog.js | ||
ve.ui.MWGalleryDialog.js | ||
ve.ui.MWMediaDialog.js | ||
ve.ui.MWMetaDialog.js | ||
ve.ui.MWMobileSaveDialog.js | ||
ve.ui.MWPreDialog.js | ||
ve.ui.MWRequiredParamBlankConfirmDialog.js | ||
ve.ui.MWSaveDialog.js | ||
ve.ui.MWTableDialog.js | ||
ve.ui.MWTemplateDialog.js | ||
ve.ui.MWTransclusionDialog.js | ||
ve.ui.MWWikitextConvertConfirmDialog.js | ||
ve.ui.MWWikitextSwitchConfirmDialog.js |