Strip all HTML elements from a HTML string and return text.

Namespace:  EPiServer.Core.Html
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public static string StripHtml(
	string htmlText,
	int maxTextLengthToReturn,
	int maxWordSize,
	string moreTextMarker
)

Parameters

htmlText
Type: System..::.String
The HTML text.
maxTextLengthToReturn
Type: System..::.Int32
The max text length to return.
maxWordSize
Type: System..::.Int32
Maximum word size osed when placing the moreTextMarker at end of string.
moreTextMarker
Type: System..::.String
The more text marker.

Return Value

A string without HTML markup.

See Also