You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What if This is red text. is dynamic content? Take for example, a wrapper element.
HTML:
<divclass="wrapper"></div>
Shortcode:
[wrapper] My dynamic content that could contain lots of HTML from the user [/wrapper]
How would I go about this? For example, My dynamic content is injected within <div class="wrapper"> My dynamic content </div>?
Maybe I'm overthinking this, but I want to use this in a WYSIWYG and I know a very similar service for Laravel lets you access the $content within the tags which renders anything between the shortcode tags.
The idea I have in my head is:
<divclass="wrapper">{{ content }}</div>
Thus dynamically rendering the content between [wrapper] and [/wrapper].
Is there a way to achieve this or access the content within the shortcode tags?
I'm going to take a slight guess and presume this may involve passing the content as a controller argument somehow?
It's not that I want to inject content as such by parameter, but HTML pre-existing through the WYSIWYG.
Cheers,
J
The text was updated successfully, but these errors were encountered:
That sounds like a very valid idea. We simply didn't have this use case yet and thus this bundle doesn't provide access to the content between the shortcode tags.
In your second example, you use:
What if
This is red text.
is dynamic content? Take for example, a wrapper element.HTML:
Shortcode:
How would I go about this? For example,
My dynamic content
is injected within<div class="wrapper"> My dynamic content </div>
?Maybe I'm overthinking this, but I want to use this in a WYSIWYG and I know a very similar service for Laravel lets you access the
$content
within the tags which renders anything between the shortcode tags.The idea I have in my head is:
Thus dynamically rendering the content between
[wrapper]
and[/wrapper]
.Is there a way to achieve this or access the content within the shortcode tags?
I'm going to take a slight guess and presume this may involve passing the content as a controller argument somehow?
It's not that I want to inject content as such by parameter, but HTML pre-existing through the WYSIWYG.
Cheers,
J
The text was updated successfully, but these errors were encountered: