HtmlValidationContext.AllowFonts property

Gets or sets the constraint that allows font element tags to be added in the HTML.

Namespace:  Microsoft.SharePoint.Publishing.Fields
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Property AllowFonts As Boolean
    Get
    Set
'Usage
Dim instance As HtmlValidationContext
Dim value As Boolean

value = instance.AllowFonts

instance.AllowFonts = value
public bool AllowFonts { get; set; }

Property value

Type: System.Boolean
When set to True, font element tags are allowed.

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.

See also

Reference

HtmlValidationContext class

HtmlValidationContext members

Microsoft.SharePoint.Publishing.Fields namespace

AllowHeadings

AllowHyperlinks

AllowImages

AllowLists

AllowTables

AllowTextMarkup