Skip to Main Content Ideas
Categories Visual Editor
Created by Ersin Akinci
Created on Sep 23, 2022

Allow buttons to accept inline children

The button block currently doesn't allow for child elements. I understand the reasoning: only inline elements can be children of `<button>`, so maybe it's easier just to prevent any children.

However, a common use case is when you want to create a button with an icon/image on it. Right now, to do that you need to create a box, set the HTML tag to `button` (which is buggy in its own way:, and then add your children.

Would be much simpler if you could add a child element and then Visual Editor highlights an error if the element isn't inline, prompting the user to set `display: inline-block` or something like that.

  • Attach files