gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Media+Text block - Need Edit HTML option for the Image

Open Cindyroo opened this issue 7 years ago • 4 comments

Describe the bug Media+Text does not allow for HTML code on the image

To reproduce Steps to reproduce the behavior:

  1. Go to Media+Text block
  2. Click on the Hamburg button
  3. The HTML Option is not there. It is an option for the Image Block but not the Media+Text block.

Expected behavior I expect to be able to edit code in the HTML so I can disable pinning of my image.

Additional Information I use the WP Tasty Pins plugin which easily allows me to disable pinning on Image blocks but it does not work on the Media+Text block, therefore I want to manually edit the HTML code to ensure the image is disabled from pinning on Pinterest.

Cindyroo avatar Apr 14 '19 01:04 Cindyroo

Regarding this issue, is there a reason why the Media - Text Block doesn't use a template-locked Inner block for the Image?

By using the template-locked image block on the media side we would also gain the benefit of not having to maintain multiple ways an Image is rendered. For example if the lazy loading attribute that some were talking about were to be added, there would only be one place you'd need to maintain that.

And it should solve @Cindyroo's problem :)

fabiankaegy avatar Apr 15 '19 10:04 fabiankaegy

I second having the ability to add html image. I want to be able to have posts for Amazon products and it is against Amazon affiliate terms to host the product images on your own server (must use Amazon's image). The media & text block would be perfect for this type of post but can't do it without being able to html link Amazon's image.

reneedobbs avatar Jul 10 '19 10:07 reneedobbs

I am not sure if we should do this because it is a complex block that is easy to break for users who do not know HTML:

<!-- wp:media-text {"align":"wide","mediaId":1045,"mediaLink":"http://localhost:10039/post-format-gallery/dsc20050604_133440_34211/","mediaType":"image","imageFill":false} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="http://62.local/wp-content/uploads/2012/12/unicorn-wallpaper-8.jpg" alt="Unicorn Wallpaper" class="wp-image-1045 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>test</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

carolinan avatar Jun 16 '23 09:06 carolinan

I'm going to close this out as it's very unlikely this is something we'd pursue.

annezazu avatar Oct 06 '25 21:10 annezazu