-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Rendering of RichText #7332
Comments
Somewhat related #5739 |
I don't see how these issues are related. (Disclaimer: read only the owners text and scanned the answers) – could you @danielbachhuber elaborate why you think so? Since you didn't assign a bug-label, I suppose this behaviour is intended. How do you suggest to use RichText dynamically? Decoding this object should be implemented by gutenberg; even if I wanted to, I don't think I have the skills to create a |
Related in the sense that
It seems like the expected behavior is to get pure HTML.
I don't have a good suggestion at this point. #6751 #5708 #2751 are also related. |
Yes it would be great if But if that's too much at this or even any point, gutenberg must provide a function to get the pure HTML. Anybody else from the team with suggestions? I mean: gutenberg clearly has the logic to turn this object into HTML already, since it is saved correctly in static context. |
I've filed this against |
Got an approach here: https://gist.github.com/AndreKelling/ac4d8be7111d27aaf236460dc5b1800e |
I had the exact same problem like katerlouis. I found a solution here: #5708 (comment) |
Closing based on @urukai's note. Please re-open if the suggestion noted doesn't solve the problem for you. |
I haven't found help for this anywhere else.
But this could also be considered a feature request, if what I'm asking is not possible yet.
When I save
<RichText />
s content into my attributes and want to use this withrender_callback
in php, it get's kinda messy. As soon as the text contains RichText (bold, italic, line-breaks etc.),$attributes
stores it really complicatedI guess there is a reason why you save RichText like this.
So how do you suggest to use it when rendering dynamically?
decode_craziness($attributes["text"])
?render_callback
[a request from Partial dynamic block rendering / Static content in dynamic blocks #7331]The text was updated successfully, but these errors were encountered: