Mixed inline static-dynamic tags #29542
Tchelet-Levi
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe..
I often find myself in situations that require some kind of text widget -- whether it is the Heading Widget or just the plain Text Editor Widget -- to mix static text content with dynamic content.
For example, say I have a thank you page.
I want the primary H1 tag to be
where {PERSON} and {TIME} are dynamic tags.
Describe the solution you'd like.
Ideally, the solution I'd like to see is the ability to mix static text with dynamic tags inline.
Similar to how shortcodes work, if we had the ability to interpolate the string with special strings such as {DYNAMIC_TAG}, that would be a very powerful feature.
For example, say in the Heading widget, I would write whatever I wanted, then once I write {DYNAMIC_TAG}, the dynamic tag option would pop up and replace the {DYNAMIC_TAG} portion of the text with the dynamic tags ui. It would then allow me to keep writing text afterwards, or even add more dynamic tags.
Below is a small illustration of how I imagined it.
I do apologize for my crude MS-Paint job, but hopefully it is enough to demonstrate what I mean.
Describe alternatives you've considered.
I have tried adding multiple elements, stacking them together to create one title, however there are two major pains in doing so.
To demonstrate them, let's say for example that to achieve the above, I would need 6 heading widgets and to arrange them as follows:
The first major pain point is the fact that the HTML is going to be all messed up.
I can no longer have one
<h1>Heading</h1>
, as using multiple heading widgets forces me to choose between having multiple<h1>
s for each part of the heading (which is awful for accessibility) or to make the entire thing a<span>
, effectively removing any heading from the page (which is also bad for accessibility).The second big issue is the fact that now I have to deal with a bunch of styles from multiple widgets.
Now I have to apply this to all the widgets.
Agreement
Beta Was this translation helpful? Give feedback.
All reactions