Title: Custom HTML block is broken
Last modified: September 19, 2026

---

# Custom HTML block is broken

 *  [aegirr](https://wordpress.org/support/users/aegirr/)
 * (@aegirr)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/custom-html-block-is-broken/)
 * After the last WordPress-update (7.1) the Custom HTML block has big issues. When
   trying to edit the HTML in the block the code becomes uneditable, that is when
   I click on the block in the WordPress editing space the code is not editable 
   on the right side. One concrete example is when I but a YouTube code in the HTML
   code this code is not editable afterwords. Clicking on it does not make the code
   appear on the right side. This is a major problem for those who like to use the
   Custom HTML block in WordPress. The only way to fix this is to use the Code editor
   instead of the Visual editor. The Custom HTML block should be fixed.
 * This topic could also belong to Fixing WordPress because I mean this is a bug.
   I also think this might be a support question because I am asking you to fix 
   a fault in WordPress. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [aegirr](https://wordpress.org/support/users/aegirr/)
 * (@aegirr)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/custom-html-block-is-broken/#post-19024156)
 * Thank you for your answer. I have to examples here.
 * Example 1
 * I copy the code from a YouTube webpage, not the URL, but the code for publishing
   the YouTube-video on my website. When I use Custom HTML block to paste the code
   into I get just this black box with a link to YouTube on it. When I click on 
   this box I am not able to edit the content of the Custom HTML block because the
   view of the content (the HTML code) of the block does not appear on the right
   side in WordPress. In other words, nothing happens when I click on the block 
   itself. No edit is possible, unless i use the Code editor in WordPress.
 * Example 2
 * I use the Custom HTML block to publish text with several hyperlinks on it so 
   that visitors can click on it to go to other parts (URLs) of my site. When I 
   click on the text in order to edit the content of the Custom HTML block I am 
   not able to edit it because I do not get the edit-box for the block on the right.
   When I click on the text I am just transfered to the webpages that represents
   the link under the text.
 * In both cases it is not possible to edit the content of the Custom HTML block.
 * The Custom HTML block has been very useful for me in order to have more control
   over the conent of my web site, but now it is a nightmare to work with
 * By the way, I think it was a mistake to add CSS and Javascript into the Custom
   HTML block, it just makes things more complex and less userfriendly. Why fix 
   something that actually works?
    -  This reply was modified 1 week, 4 days ago by [aegirr](https://wordpress.org/support/users/aegirr/).
 *  [wpdynamics](https://wordpress.org/support/users/wpdynamics/)
 * (@wpdynamics)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/custom-html-block-is-broken/#post-19024208)
 * [@aegirr](https://wordpress.org/support/users/aegirr/) I’m wondering you’re using
   custom HTML block for Youtube instead oEmbed? What is the reason for that? You
   have to add some special attributes or markup?
 * I really recommend to avoid custom html whenever possible. When your site it 
   growing, its very hard to handle it. If oEmbend not work for your usecase, you
   can still create a custom shortcode, then you can update/change the youtube code
   on one place instead everywhere on your site.
 *  [prateekshawebdesign](https://wordpress.org/support/users/prateekshawebdesign/)
 * (@prateekshawebdesign)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/custom-html-block-is-broken/#post-19024358)
 * hi [@aegirr](https://wordpress.org/support/users/aegirr/) 
 * I’ve noticed the same issue with the Custom HTML block after the recent WordPress
   update.
 * For now, I’ve been using the **Code Editor** when I need to edit HTML. For things
   like YouTube videos, I prefer using the built-in **YouTube/Embed block** instead
   of adding iframe code manually.
 * For larger or reusable HTML, I usually move it into a **shortcode or custom block**.
   These are good alternatives until the Custom HTML block issue is fixed.
 *  [Jahirul Islam](https://wordpress.org/support/users/jahirulwp/)
 * (@jahirulwp)
 * [5 days, 17 hours ago](https://wordpress.org/support/topic/custom-html-block-is-broken/#post-19028906)
 * Hi [@aegirr](https://wordpress.org/support/users/aegirr/),
 * WordPress 7.1 changed the Custom HTML block. You no longer edit the code in the
   sidebar. Once the block is selected, there’s an **Edit code** button in the block
   toolbar and in the block’s Settings sidebar. It opens an “Edit HTML” window with
   HTML, CSS and JavaScript tabs; click **Update** to save.
 * The catch is that the block now shows your HTML live in the editor, so clicking
   on it hits the video or the link instead of selecting the block. To select it
   without clicking the content:
    1. Open List View (the three-lines icon in the top toolbar, or Shift+Alt+O; Ctrl
       +Option+O on Mac).
    2. Click the Custom HTML block in the list.
    3. Click **Edit code**.
 * For YouTube, pasting the video URL on its own line creates an Embed block, which
   avoids the problem entirely. If clicking a link actually takes you out of the
   editor, that looks like a bug worth reporting on [Gutenberg GitHub](https://github.com/WordPress/gutenberg/issues)
   with these steps.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-html-block-is-broken%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [editing](https://wordpress.org/support/topic-tag/editing/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [Jahirul Islam](https://wordpress.org/support/users/jahirulwp/)
 * Last activity: [5 days, 17 hours ago](https://wordpress.org/support/topic/custom-html-block-is-broken/#post-19028906)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
