Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
494 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 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...