<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Widget Not parsing HTML content provided in render() in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/custom-widget-not-parsing-html-content-provided-in/m-p/1091750#M30986</link>
    <description>&lt;P&gt;I am not able to render HTML data into the custom widget.&lt;BR /&gt;I tried below code:&lt;/P&gt;&lt;P&gt;render() {&lt;BR /&gt;const classes = {&lt;BR /&gt;[CSS.emphasis]: this.emphasized,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;const { state } = this.viewModel;&lt;/P&gt;&lt;P&gt;const description = this.viewModel.description;&lt;/P&gt;&lt;P&gt;// Define dynamic styles&lt;BR /&gt;const loadingStyle = {&lt;BR /&gt;display: "block"&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;return (&lt;BR /&gt;&amp;lt;div class="data"&amp;gt;&lt;BR /&gt;&amp;lt;div key="description" tabindex={this.tabindex} class="work" styles={loadingStyle}&amp;gt;&lt;BR /&gt;&amp;lt;div key="description" dangerouslySetInnerHTML={{__html: this.viewModel.description}}&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting html format data lie &amp;lt;div&amp;gt;&amp;lt;span&amp;gt;&amp;lt;strong&amp;gt;Data&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; in&amp;nbsp;this.viewModel.description but I it's not getting rendered on view.&lt;BR /&gt;&lt;BR /&gt;I am assigning viewmodel property from controller where widget is created as shown below.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;mapWidget.viewModel.description = widget.MapWidgetManagement.Description;&lt;BR /&gt;mapWidget.viewModel.mapWidgetManagement = widget.MapWidgetManagement;&lt;/P&gt;&lt;P&gt;var bgExpand = new Expand({&lt;BR /&gt;view: mapView,&lt;BR /&gt;content: mapWidget,&lt;BR /&gt;expandIconClass: "esri-icon-question",&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 15:30:14 GMT</pubDate>
    <dc:creator>RoshanShah</dc:creator>
    <dc:date>2021-08-24T15:30:14Z</dc:date>
    <item>
      <title>Custom Widget Not parsing HTML content provided in render()</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/custom-widget-not-parsing-html-content-provided-in/m-p/1091750#M30986</link>
      <description>&lt;P&gt;I am not able to render HTML data into the custom widget.&lt;BR /&gt;I tried below code:&lt;/P&gt;&lt;P&gt;render() {&lt;BR /&gt;const classes = {&lt;BR /&gt;[CSS.emphasis]: this.emphasized,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;const { state } = this.viewModel;&lt;/P&gt;&lt;P&gt;const description = this.viewModel.description;&lt;/P&gt;&lt;P&gt;// Define dynamic styles&lt;BR /&gt;const loadingStyle = {&lt;BR /&gt;display: "block"&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;return (&lt;BR /&gt;&amp;lt;div class="data"&amp;gt;&lt;BR /&gt;&amp;lt;div key="description" tabindex={this.tabindex} class="work" styles={loadingStyle}&amp;gt;&lt;BR /&gt;&amp;lt;div key="description" dangerouslySetInnerHTML={{__html: this.viewModel.description}}&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting html format data lie &amp;lt;div&amp;gt;&amp;lt;span&amp;gt;&amp;lt;strong&amp;gt;Data&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; in&amp;nbsp;this.viewModel.description but I it's not getting rendered on view.&lt;BR /&gt;&lt;BR /&gt;I am assigning viewmodel property from controller where widget is created as shown below.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;mapWidget.viewModel.description = widget.MapWidgetManagement.Description;&lt;BR /&gt;mapWidget.viewModel.mapWidgetManagement = widget.MapWidgetManagement;&lt;/P&gt;&lt;P&gt;var bgExpand = new Expand({&lt;BR /&gt;view: mapView,&lt;BR /&gt;content: mapWidget,&lt;BR /&gt;expandIconClass: "esri-icon-question",&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 15:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/custom-widget-not-parsing-html-content-provided-in/m-p/1091750#M30986</guid>
      <dc:creator>RoshanShah</dc:creator>
      <dc:date>2021-08-24T15:30:14Z</dc:date>
    </item>
  </channel>
</rss>

