Copying an Image to a new TextWebPart causes SharePoint to mess up the lay-out?

Copper Contributor



I created a Logic App that is able to translate SharePoint pages through the DeepL API. To do this, I use GraphAPI. I'm getting the canvasLayout, translate every WebPart in there and update the translated page to the new page.


Everything goes well, but images in TextWebParts. The canvasLayout recognized two WebParts, where the image is a separate standard (Image) WebPart. They are connected by an ID in the HTML of the TextWebPart. See the picture below. Left is the original document, right is the translated document.



When going in edit mode, the SharePoint page looks like this.



I checked both pages, comparing them using a GET method on both canvasLayouts of the pages.

There is no difference in between those (I translated from CS to CS, so that's fine). Attached are the canvasLayouts of the pages.



I am puzzled in how SharePoint has different behaviour in similar code and would appreciate any explanation or solution.





0 Replies