2sxc - Field with HTML content

93 views Asked by At

I need a field to store content with html code like:

This is my text<br>Text after paragraph

However, string fields will replace every symbol and outputs it with entity names like &lt;br&gt; when I output it in @Content.mystringwithhtml.

Is there any workaround besides creating a JS function to decode it?

Best regards, João

1

There are 1 answers

6
J King On BEST ANSWER

you need to use the HTML.Raw function create a multi line content field and choose the default wysiwyg edititor. THen add your HTML in teh editors html or raw view.

then in your view use this:

@Html.Raw(Content.YourField)