Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media & Text block: Option to link media. #15422

Closed
paaljoachim opened this issue May 3, 2019 · 16 comments · Fixed by #18139
Closed

Media & Text block: Option to link media. #15422

paaljoachim opened this issue May 3, 2019 · 16 comments · Fixed by #18139
Assignees
Labels
[Block] Media & Text Affects the Media & Text Block Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented May 3, 2019

Is your feature request related to a problem? Please describe.
It would be nice to be able to link the media in the Media & Text block. Similar to the single image block.

Existing Media & Text block:
Screen Shot 2019-05-03 at 18 19 56

Single image block:
Screen Shot 2019-05-03 at 18 21 03

Describe the solution you'd like
A standard single image linking method added to the block.

Describe alternatives you've considered
Well one could probably go in through HTML and add a link but that is not very intuitive.


Btw we need a consistent way to handle images in all blocks.

@swissspidy swissspidy added the [Block] Media & Text Affects the Media & Text Block label May 4, 2019
@idea--list
Copy link

idea--list commented Jun 26, 2019

Yes please!
Just logged my first client confusion just because this.

There is yet another consistency issue with the Media&text block:
One can simply not find the option "edit as html" for this block type, neither for the image inserted by this block:
image

The only way to edit the html of this block type is to edit the whole post/page in html which can be overwhelming. But even doing so, the link inserted via html will be cut out, probably by some verification in the background. That means currently there is no way to add this ability to an image in a media&text block.

@donalirl
Copy link

donalirl commented Jul 9, 2019

I've encountered this a few times. It's a common use case to want to link that image, and the only way possible right now is to use HTML. It would be great to see the link option added!

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Aug 23, 2019

So what we need right now is a dev that is able to add the image link icon to the toolbar.
So we go from this:

Screen Shot 2019-08-23 at 12 46 59

To this:
Media-text-block-link-image

Perhaps this is something that Andrei can take a look at? Or someone else.
@draganescu

@draganescu
Copy link
Contributor

I guess here the main concern is that the block is Media + Text, not Image + Text. Video files are not usually linked and I feel as if folk use this block "improperly", instead of using a floated image block and a heading.

I'll label it accordingly and wait it out :)

@draganescu draganescu added the Needs Design Feedback Needs general design feedback. label Aug 23, 2019
@richtabor
Copy link
Member

I guess here the main concern is that the block is Media + Text, not Image + Text. Video files are not usually linked...

We could have the Link Settings panel only available if mediaType is not video.

@phpbits
Copy link
Contributor

phpbits commented Sep 24, 2019

I've created a solution for this issue few weeks ago on EditorsKit plugin : https://wordpress.org/plugins/block-options/ . Here's how it works :

Screen Capture on 2019-09-25 at 01-05-53

My implementation is using the similar existing way of adding link on Image Block. Then added few link options for "rel" attributes. The link toolbar will only be available when media type is image.

@mapk
Copy link
Contributor

mapk commented Sep 25, 2019

@phpbits that feels pretty good. @draganescu what do you think about just showing the link option for images as in the EditorsKit plugin? ... without all the extra link options though...

@phpbits
Copy link
Contributor

phpbits commented Sep 25, 2019

@mapk Thanks! I've spiced up the Media and Text Block a bit last few weeks. I've also added the card-like layout aside from left and right image position ;)

Edited:

Please make sure to check this issue as well : #17556 . I believe the images will be linked to sponsored urls as well. So this is related. Thanks!

@draganescu
Copy link
Contributor

Yes, I think we're set, will assign this to me and take a stab at it. ( cc @mapk )

@draganescu draganescu self-assigned this Sep 26, 2019
@draganescu
Copy link
Contributor

@mapk should we also include the Media File and Attachment options that the image block's link control provides?

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 28, 2019
@draganescu
Copy link
Contributor

This is now testable in #18139

@Clearly5000
Copy link

Having a similar issue as described at the start of this post. Is this feature out of testing and live on Wordpress.org/.com? Would love to be able to use it!

@draganescu
Copy link
Contributor

Howdy @Clearly5000 it is almost ready, goign through reviews right now, it will be testable as soon as #18139 gets merged in master.

@Clearly5000
Copy link

Great news, thanks!

@MAHNOORKHANDURRANI
Copy link

i used media and text block ....and i want to edit the image through html want to add more images with a class ewhich i will use for js ...but i cant find the edit as html option...plus how one can achieve this with media and text block

@draganescu
Copy link
Contributor

Hi! @MAHNOORKHANDURRANI Your question seems more fit in the WordPress developer forum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants