Text Component Embedded Image Valid HTML

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3160339%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EText%20Component%20Embedded%20Image%20Valid%20HTML%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3160339%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3ETrying%20to%20figure%20out%20how%20to%20format%20valid%20HTML%20for%20a%20embedded%20image%20in%20a%20text%20component.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E-%20Image%20is%20already%20on%20site%2C%20I%20know%20the%20URL%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E-%20Using%20PnP.PowerShell%20to%20import%20html%20into%20text%20component%20in%20a%20page%2C%20which%20if%20isn't%20supported%2Fvalid%20HTML%20the%20publishing%20engine%20stripped%20out%20on%20page%20save.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E-%20I%20don't%20think%20there%20is%20markup%20for%20Images%20similar%20to%20link%20being%20%5B%5BText%7CURL%5D%5D%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EExporting%20a%20text%20component%20with%20an%20image%20embedded%20produces%20this%20result.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EWhich%20the%20only%20thing%20unique%20seems%20to%20be%20%3CSTRONG%3Edata-instance-id%20%26lt%3B%5C%2FSTRONG%26gt%3Bwhich%20I'm%20not%20sure%20where%20this%20ID%20is%20coming%20from%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3CPRE%20class%3D%22%5C%26quot%3Blia-code-sample%22%20language-markup%3D%22%22%3E%3CCODE%3E%20%20%20%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FP%3E%3CDIV%20tabindex%3D%22%5C%26quot%3B-1%5C%26quot%3B%22%20data-cke-widget-wrapper%3D%22%5C%26quot%3B1%5C%26quot%3B%22%20data-cke-filter%3D%22%5C%26quot%3Boff%5C%26quot%3B%22%20class%3D%22%5C%26quot%3Bcke_widget_wrapper%22%20cke_widget_block%3D%22%22%20cke_widget_inlineimage%3D%22%22%20cke_widget_wrapper_webpartinrteinlineimage%3D%22%22%20cke_widget_wrapper_webpartinrtealigncenter%3D%22%22%20cke_widget_wrapper_webpartinrte%3D%22%22%3E%5Cn%20%20%20%20%20%20%3CDIV%20data-webpart-id%3D%22%5C%26quot%3Bimage%5C%26quot%3B%22%20class%3D%22%5C%26quot%3BwebPartInRte%22%20webpartinrteinlineimage%3D%22%22%20cke_widget_element%3D%22%22%20webpartinrtealignleft%3D%22%22%20webpartinrtealigncenter%3D%22%22%3E%3C%2FDIV%3E%5Cn%20%20%20%3C%2FDIV%3E%26lt%3B%5C%2Fcode%26gt%3B%26lt%3B%5C%2Fpre%26gt%3B%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3160339%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EPnP%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
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>
   </div>

 

0 Replies