Text Component Embedded Image Valid HTML

Regular Contributor

Trying to figure out how to format valid HTML for a embedded image in a text component.

- Image is already on site, I know the URL

- Using PnP.PowerShell to import html into text component in a page, which if isn't supported/valid HTML the publishing engine stripped out on page save.

- I don't think there is markup for Images similar to link being [[Text|URL]]


Exporting a text component with an image embedded produces this result.

Which the only thing unique seems to be data-instance-id which I'm not sure where this ID is coming from


   <div tabindex="-1" data-cke-widget-wrapper="1" data-cke-filter="off" class="cke_widget_wrapper cke_widget_block cke_widget_inlineimage cke_widget_wrapper_webPartInRteInlineImage cke_widget_wrapper_webPartInRteAlignCenter cke_widget_wrapper_webPartInRte" data-cke-display-name="div" data-cke-widget-id="1" role="region" aria-label="Inline image in RTE. Use Alt + F11 to go to toolbar. Use Alt + P to open the property pane.">
      <div data-webpart-id="image" class="webPartInRte webPartInRteInlineImage cke_widget_element webPartInRteAlignLeft webPartInRteAlignCenter" data-cke-widget-data="%7B%22classes%22%3A%7B%22webPartInRteInlineImage%22%3A1%2C%22webPartInRteAlignCenter%22%3A1%2C%22webPartInRte%22%3A1%7D%7D" data-cke-widget-upcasted="1" data-cke-widget-keep-attr="0" data-widget="inlineimage" data-instance-id="009d57ba-2cb4-4d0a-8c5a-ff505f366815" title=""></div>


0 Replies