Tinymce and ASP.NET (c #) Webmatrix

1

Good, I have a situation, I enter data to my DB sql by means of a textarea with tinymce, in the database something like this is saved:

<div class="f kv _SWb" style="color: #808080; height: 17px; line-height: 16px; font-family: arial, sans-serif; font-size: small; white-space: nowrap;"><cite class="_Rm" style="color: #006621; font-style: normal; font-size:

My problem is that when you call that text from the database and show it via cshtml , it's the same without format, and the idea of tinymce is that it's formatted.

I do not know what I'm doing wrong, in the DB I keep it in NVARCHAR , I've already put it in the <p> <textbox> ....... tags on all the tags and it continues to show itself without format, I do not know what to do ... help.

    
asked by Atejada 04.10.2016 в 22:02
source

1 answer

1

You could try using

@Html.Raw(Model.PropContenidoHtml)

in this way the html will be rendered in the browser

HtmlHelper.Raw Method (String)

    
answered by 05.10.2016 / 18:49
source