Control to render out plaintext
The "Content" data of the News module is html
But I have a need to convert that Html content to just plaintext to display on the page (inside of a widget template)
Is there a built-in control which will do just that? FieldListView, HtmlField, Something?
I know I can feed it though the RadEditor, was just wondering if there was an easier way.
Steve
Hi Steve,
An option would be to use HtmlField control, as you pointed out. Can you, please, try using this sample code:
<
sitefinity:HtmlField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("Content")%>' />
Value='<%# Eval("Content")%>'
you'll get the plain text displayed (however, please have in mind that the Html tags will also be displayed on the frontend as plain text)So is their a hybrid of the two that would work?
Like feed in the HTML, but the output would be like TextField?
Essentially I just want all Markup stripped out....
Its a news\event viewer and with HTML enabled the styling just looks strange :)