pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
679 stars 347 forks source link

Add contents to codesnippet webpart #4223

Closed jbulters closed 2 months ago

jbulters commented 2 months ago

Hello,

Using Add-PnPPageWebPart -Page $page -Section 2 -Column 1 -DefaultWebPartType CodeSnippet -WebPartProperties $webPartProps

I added a codesnippet webpart.

Using jsonproperties i am able to add the html property. The code is shown in the webpart in the sharepoint page. However upon editing, in sharepoint, the codesnippets are empty.

How can I add contents to this webpart? I.e. the code to display in the webpart.

Thanks, Jeroen

molenaar commented 2 months ago

Some guidance would be appreciated, I am struggling with these kind of issues too. Content was written in the web part, page saved, published and visible. However content disappears from the web part when i edit the page.

gautamdsheth commented 2 months ago

Moving to discussion