Jane2
Jane2

Reputation: 67

How to remove HTML tags from ckeditor to textarea

I am attempting to create a simple blog that has a post article function that contains a ckeditor. When I insert text from ckeditor and store it in the database, I want to get the content from the database to show it on my index page.

The problem is that it can show the content but it displays the HTML tags

Screenshot of blog post. It contains visible paragraph tags around the text.

Upvotes: 4

Views: 1463

Answers (1)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35853

To display string as Html in ASP.NET.MVC use this one:

@Html.Raw(@Model.PropertyName)

where PropertyName is the name of your property

Upvotes: 4

Related Questions