Right now if you have some rich content with an image and paste it into VisualEditor, we discard the image.
However, it'd be nice to add some special handling in VisualEditor's paste for the HTML of images so that those from Commons used on a MediaWiki instance get sought out and inserted instead.
Perhaps via a special custom attribute VE would sniff for, that would make VE try to find the image from Commons (if the wiki was configured for InstantCommons), or other fileRepos?
MediaViewer's "embed" HTML looks like:
<p><a href="http://commons.wikimedia.org/wiki/File:Beach_sand.jpg#mediaviewer/File:Beach_sand.jpg"><img src="http://upload.wikimedia.org/wikipedia/commons/c/c5/Beach_sand.jpg" alt="Beach sand.jpg" height="1200" width="1600"></a>[…]</p> |
If we asked them to add an attribute, e.g. (simplified):
<p><a href="…"><img src="…" alt="…" ve-data="ve-pastableImage" ></a>[…]</p> |
… could we do this?
(Also, yes, they should be using <figure> instead of <p><img></p>.)
Version: unspecified
Severity: enhancement