Open swinggraphics opened 4 years ago
What would be the point?
Seems to me that if every bold or italic or underline text showed up in the structure panel, it would get messy and bloated real fast.
How many more element settings are available on the bold element? It's a binary toggle, it's not like there are settings you can change about bolded text. Do you ever see people type something like <b style='display:block;padding:10px;margin-right:12px'>bolded</b>
?
I'm not saying there isn't a use case, but I think it's not quite valid HTML to treat B, I, U as if they were more full "normal" elements. If you start adding a bunch of extra styles to a B tag, it's not really bold any more, it's a span with a bunch of extra styles like font-weight.
In other words, why would B, I, U or even <a>
have the same settings as a span? That seems to be taking them outside what they are meant for.
How often do I want just the bolded word in a string larger and a different color than the surrounding text? Quite frequently. And when I do that, I might want to adjust the line height or give it some padding. I don't like adding spans unnecessarily. It doesn't get any more messy in Structure than adding spans, and it does eliminate extraneous elements on the front end. Of course you can argue that b
and i
are no more semantic than span
, but the lack of strong
and em
is a separate issue…
Maybe if these elements had a toggle switch to show/hide in structure view just to keep it clean. You can always directly select them. If you had a text element, and a few words within it were bold, why would we want that in structure panel? It's not like we would need to drag and drop just the bold part to some other part of the DOM. It is more or less directly linked to the surrounding text element.
Anyway, I don't know how to solve it, I just thought it would be a bit much to treat these inline elements the same as other elements.
Describe the feature you'd like to see included in Oxygen. B, I, U, S and link buttons in the Text component editor should create elements that appear in Structure and have the same settings as spans.
What are the use cases for this feature? Literally every site I have ever built
Examples of this feature or functionality. Elementor, Beaver Builder, Divi, Gutenberg, TinyMCE…