Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
523 views
in Technique[技术] by (71.8m points)

razor pages - How To Get HTML Formatted Stored Text To Display Properly

I am using TinyMCE as a RTE. The data is storing properly in my database. However when I go to retrieve the data it is not being displayed with the formats, even though the format is there. I added a hard coded line of the formatted text, copied from the database, to verify that it is being stored properly. The issueStatus contains the same text as what is hard coded (as you can see in the screen shot).

The code

@Model.IssueData.issueStatus<br />
<p>This text is<strong> BOLD</strong></p>

Here is how it is displaying.

Here is How it is displaying

What do I need to do to get the stored text to display properly?

question from:https://stackoverflow.com/questions/65939425/how-to-get-html-formatted-stored-text-to-display-properly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

@MikeBrind had the solution. I needed to use @HtmlRaw.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...