Support » Requests and Feedback » Gutenberg blocks need to support standard html

  • Resolved Bob Easton

    (@bobeaston)


    Today (WP=5.3), the only Gutenberg block that supports the id= attribute is the heading block. The id attribute is a standard html attribute that can be applied to any html element. (W3C standard reference here.) In addition to headings we need to be able to apply id attributes to paragraphs, separators, and forms. Is this support in the plans for Gutenberg?

    a little extra detail… If I edit a paragraph block (for example) to include id=”foobar”, the editor responds with the message “This block contains unexpected or invalid content.” Then, it wants to either remove the id element or convert the block to an html block. I’d rather it accept the legitimate attribute.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Have you tried a Custom HTML block instead? https://wordpress.org/support/article/custom-html/

    chinaman123

    (@chinaman123)

    Use Classic Editor and you can manually do all this without any problems. I found Gutenberg feature on the new WordPress to be a pain. It goes and does stuff without your permission.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    To be clear, so does the Classic Editor. Invalid HTML correction has always been built-in.

    Bob Easton

    (@bobeaston)

    It’s my turn to be clear….

    I am NOT looking for alternative ways to insert perfectly legitimate HTML into a WordPress post. If I really wanted to code HTML, I’d fire up that 20 year old copy of DreamWeaver and go to it.

    This is a development request. Or, depending on how one thinks, a bug report. What I am asking is that the Gutenberg editor developers support the current HTML standard (ALL of it), and not reject valid HTML.

    If WordPress wants to force Gutenberg on us (by ending Classic editor support in 2021), the developers need to pay attention to standards and stop rejecting valid HTML elements and attributes.

    Even though I don’t care for some actions of the Classic editor, it does not currently reject valid HTML. Maybe Gutenberg needs to use the HTML validation routines that the Classic editor uses?

    Bob Easton

    (@bobeaston)

    This is apparently the wrong place to post an issue for the Gutenberg developers. I’ll move my concern to the Gutenberg issues tracker on GitHub.

    Thanks for the earlier suggestions!

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Gutenberg blocks need to support standard html’ is closed to new replies.