Search code examples
htmlasp.net-core-mvcrich-text-editor

Getting HTML as plain text


I am taking HTML as input from a page using Tinymce(Rich Text editor), and saving input to SQL server , While retrieving the data form database and passing it to view ,all html tags and content are showing as plain text.

I am using asp.net core MVC.


Solution

  • This is where you would want to use Html.Raw()

    Html.Raw() with render the HTML string you pass to it as markup on the page.