Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
18.7.0
-
None
-
Unknown
-
Description
Motivation
When you select an image in the WYSIWYG editor and open the link dialog to create a link, the link target is left empty, so you have to look the image up yourself in order to link to it. The most common intent in this case is to link the image to its own source, e.g. so that readers can open the full size image, so the link target can be preselected from the image that is selected.
Proposal
When the link dialog is opened to create a new link and the content selection is an image:
- preselect the link target with the resource reference of the image source
- select the resource type that matches that source: attach when the image is attached to a wiki page, url when the image is external
Notes
- This is the counterpart, for an image selection, of the link target preselection done for a text selection in
XWIKI-24834. An image selection has no text to compute a page name from, which is why the link target is currently left empty. - The implementation belongs in the CKEditor link plugin (xwiki-link/plugin.js), which is the layer that knows about the image widget and its resource reference. The shared resource picker code (xwiki-platform-wysiwyg-webjar) is editor agnostic, so it shouldn't be coupled to a CKEditor selection.
Attachments
Issue Links
- is related to
-
XWIKI-24834 Creating a link to a new page by selecting text and validating the link dialog produces an empty link target
-
- Closed
-
- relates to
-
XWIKI-24861 Create a URL or mailto link when the selected text looks like a URL or an email address
-
- Open
-