HtmlValidationContext.AllowTextMarkup Property
Gets or sets the constraint that allows explicit text markup tags, such as bold and italic, to be added in the HTML.
Namespace: Microsoft.SharePoint.Publishing.Fields
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Property AllowTextMarkup As Boolean
Get
Set
'Usage
Dim instance As HtmlValidationContext
Dim value As Boolean
value = instance.AllowTextMarkup
instance.AllowTextMarkup = value
public bool AllowTextMarkup { get; set; }
Property Value
Type: System.Boolean
Default is True.
Remarks
When set to True, table handling tags are allowed. If you set this flag to False, the following tags are removed:
<B>, <EM>, <I>, <STRONG>, <S>, <STRIKE>, <TT>, <ABBR>, <ACRONYM>, <CITE>, <CODE>, <DEL>, <DFN>, <INS>, <SAMP>, <BDO>, <RT>, <RUBY>, <U>, <BIG>, <SMALL>, <SUB>, <SUP>, <PRE>, <PLAINTEXT>, <XMP>, <Q>, <LISTING>, <BLOCKQUOTE>, <NOBR>,and <WBR>.
Examples
// Set the constraint properties to any desired combination of true and false
validationContext.AllowFonts = true;
validationContext.AllowHeadings = false;
validationContext.AllowHyperlinks = true;
validationContext.AllowImages = false;
validationContext.AllowLists = false;
validationContext.AllowTables = true;
validationContext.AllowTextMarkup = false;
Note
This example is part of the larger ValidateHtmlCode sample in the HtmlValidationContext topic.