This repository was archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp component base.icomponentpropertymetadata.ishtmlstring
John Nguyen edited this page Aug 19, 2021
·
1 revision
Home > @microsoft/sp-component-base > IComponentPropertyMetadata > isHtmlString
Indicates whether the property should be serialized as HTML.
Signature:
isHtmlString?: boolean;
This flag instructs framework to store the value as HTML, so that SharePoint can perform the following services on it:
-
normalizing HTML encodings
-
stripping unsafe HTML tags (i.e. for usage with Element.innerHTML)
-
search indexing
-
SharePoint link fix-up
Only enable this flag for HTML content where these modifications are acceptable. If non-HTML content is provided, SharePoint framework might make modifications to convert it to HTML valid. For plain text content that simply needs to be exposed to the search index (without any rewriting), use the isSearchablePlainText
flag instead.