Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Open link in a new tab checkbox #25

Closed
maddisondesigns opened this issue Mar 16, 2017 · 5 comments
Closed

Open link in a new tab checkbox #25

maddisondesigns opened this issue Mar 16, 2017 · 5 comments

Comments

@maddisondesigns
Copy link

It would be nice if there was an Open link in a new tab checkbox on the Select Image dialog rather than having to select an image and then edit the image, just to select this checkbox. It makes for a cumbersome user experience.

i.e. on this screen: https://cl.ly/0I3l1U1a0l1n

@westonruter
Copy link
Contributor

For now we've just been re-using existing media frames and their core templates. So the Attachment Display Settings are defined in this template: https://github.com/WordPress/wordpress-develop/blob/4.7.3/src/wp-includes/media-template.php#L604-L678

We'd have to somehow override the AttachmentDisplay.prototype.template when opening the frame, per:
https://github.com/WordPress/wordpress-develop/blob/4.7.3/src/wp-includes/js/media/views/settings/attachment-display.js#L13-L15

However, there are many other display settings that are available in the edit frame which aren't available in the abbreviated display settings on the select frame, so I'm not sure if adding this one setting setting should be done while the others are left out.

@maddisondesigns
Copy link
Author

Besides the Open link in a new tab checkbox, the only other options that aren't on that Select image dialog (but are on the Edit frame) are the Image Title Attribute, Image CSS Class, Link Rel and Link CSS Class fields. I would argue that those 4 particular fields are very rarely, if ever, used, whereas the new tab checkbox is something that a lot of people use quite regularly.

Personally, I think that checkbox should be on that dialog permanently, so that it's available even when inserting an image into your standard Post/Page content.

@westonruter
Copy link
Contributor

@maddisondesigns this might be something then to propose in a Trac ticket for the media manager generally rather than specifically for the image widget.

@maddisondesigns
Copy link
Author

Yeah, that's fair enough. Happy for you to close this one then and I can raise a Trac ticket and see if anything happens with it. Thanks.

@westonruter
Copy link
Contributor

Thanks for the good discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants