Hi,
First of all, thank you for a great product!
I’m using Wappler 3.3.5 and using the appropriate bindings, I can store html-formatted text in a database table, retrieve it via a server action, and display it in a page.
That text, however, must be static. Any dynamic bindings stored in the database table will be rendered as a string, that is, without parsing it.
This feature request is to add a native option to Wappler, which I’ll call it “Inner Parsed” for now. This “Inner Parsed” option could be shown together with the “Inner HTML” and “Inner Text” options that appear under Dynamic Attributes > Display.
Any text bound to the proposed “inner parsed” option (e.g., a string returned by the execution of a server action) will be parsed for dynamic content before rendering it.
To clarify further the current behaviour , assume a page that has:
- A server connect sc1 that returns the a value called radius
- A variable call pi, that contains the value 3.14
- A paragraph that looks like this: Perimeter: {{sc1.data.radius * pi.value * 2}} cm
When the page is rendered, and ignoring any syntax error in my example and assuming that sc1 returns a radius of 10, the following will be shown:
Perimeter: 62.8 cm
Assume now that
- I keep the text in 3 above in a database table
- I have a server connect sc2 that retrieves the value what is stored in the db table
- I set my paragraph to show the results of sc2 (probably by binding something like sc2.data.stringtoshow to the paragraph’s Dynamic Attributes > Display > Inner HTML)
The page will shows the string Perimeter: {{sc1.data.radius * pi.value * 2}} cm as I saved it, i.e., without interpreting the values of the variables, and the page show look something like this:
Perimeter: {{sc1.data.radius * pi.value * 2}} cm
The desired behaviour, is that if I bind the results of the server connect sc2 to the requested “inner parsed” option, the page will show
Perimeter: 62.8 cm
Now, since you made it up to this point, maybe I can add a small request to simplify the UI a bit.
Instead of having 3 options (inner text, inner html, and inner parsed) in the Dynamic Attributes > Display, maybe you could have only one and have two checkboxes inside it to select how the bound content will be treated (one to request interpreting any found html tags and the other to request interpreting any found bindings), maybe defaulting both to false, so the binding will be interpreted as simple text.
Many thanks!
Last updated: