Textarea Macro Parameter Not Rendering HTML Markup
See original GitHub issueIn Umbraco v8, I am inserting a macro into the grid editor.
I am using a macro to embed a hubspot form code into a parameter that is a textarea called embed
.
The macro itself just renders the embed code in the parameter like so: @Html.Raw(Model.MacroParameters["embed"])
The output of this is literally printing the html markup that I put into the macro parameter.
If I output just the parameter without Html.Raw
then I get the decoded markup printed out. ( &
instead of “&”)
When I tested just entering this macro into the RTE, the macro disappears on save.
I was able to do this in previous versions of Umbraco just fine but it seems that I can no longer do this in v8. I posted this on our as well.
This item has been added to our backlog AB#2540
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
umbraco 8 textarea macro parameter not rendering html ...
I am using a macro to embed a hubspot form code into a parameter that is a textarea called embed . The macro...
Read more >ReactJS component not rendering textarea with state ...
The string is not printed in the textarea. I tried this to debug: render() { var summary = "this is a summary" ...
Read more >How to override MacroBrowser postPreview function?
Hi all, I am currently modifying the Mermaid Macro Plugin on Confluence Server such that users can input the diagram code directly in...
Read more >Getting Input for a Macro
Here is an example that inserts a pair of HTML markup tags specified by the user. // Insert_Tag.bsh void insertTag() { caret =...
Read more >The Textarea element - HTML: HyperText Markup Language
This attribute enables you to place <textarea> elements anywhere within a document, not just as descendants of form elements. maxlength. The ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bkclerke the macro parameter value is stored encoded and hence when you use the
@Html.Raw(..)
it renders the html mark up. As a workaround i tried performing a decode before passing it onto the Raw function and i was able to render the HTML form. Below is the code i used.@Html.Raw(System.Web.HttpUtility.HtmlDecode(Convert.ToString(Model.MacroParameters["embed"])))
PS:Not a good one, but might able to help you until the bug is resolved.
I couldn’t manage to get the backoffice showing the form render but the webpage shows it right.
Hope this helps.
Thanks @bkclerke - I can reproduce the error. Now to find the cause… 🙈