User Profile
BertJansen
Joined 9 years ago
User Widgets
Recent Discussions
Re: Migrating HTML to Modern Pages - Looks great until page is edited, then content is lost
Here's the latest code (https://github.com/pnp/pnpframework/blob/dev/src/lib/PnP.Framework/Modernization/Transform/HtmlTransformator.cs) which should be fairly similar. When it comes to inline images: these were never fully supported by the Page Transformation tech, during transformation the default behavior was to create the images as separate image web parts and split the html in parts so the image web parts could fit in between. Now that inline images are supported on modern pages Page Transformation should get updated to support those, that's a two step approach. First the underlying pages API implementation needs to be updated and that's done (see https://pnp.github.io/pnpcore/using-the-sdk/pages-webparts.html#using-inline-images-in-text-parts). Next is updating the page transformation bits themselves, but that work is still pending.8KViews1like0CommentsRe: Adding Client Side Web Part with SharePoint CSOM on Modern page
Hi, There are no official CSOM API's for manipulating client side pages but we're working on a graph API for creating/updating modern pages. This API however has not yet been released. As an alternative, you can use .Net API in PnP Sites Core when you use C# code. That same API is also wrapped into a series of PnP PowerShell cmflets in case you prefer PowerShell3KViews0likes1CommentRe: Migrating HTML to Modern Pages - Looks great until page is edited, then content is lost
This looks like a bug, tables created using the editor should always stay editable by the editor. Can you open a support case for this? Alternative describe a repro in here and I'll get the right folks to see it.9.4KViews0likes4CommentsRe: How to create Repost Page (Modern Page Library) with PowerShell
Adding content type support when provisioning client side pages is something we do have in the PnP backlog...but in the meanwhile did you try the following: - create page using default content type - switch content type using set-pnplistitem (see https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnplistitem?view=sharepoint-ps)10KViews1like4CommentsRe: Modern WebPage - Error with getpreview.ashx when a Repost page is published
When you create a page using the UI SharePoint will pick the first (preview) image it finds and uses that as the image to display the page in the news web part. If you programmatically create pages using the PnP client-side API (so using the .Net PnP Site Core library or using PnP Powershell) then you'll have a similar behavior as the API will try to pick the first image (via entries in the imageSources JSON node), although it's not as enhanced as the native feature. If you want to change things you could look into setting the BannerImageUrl field. We use the following construct in our API implementation: item[ClientSidePage.BannerImageUrl] = $"{rootUri}_layouts/15/getpreview.ashx?guidSite={site guid}&guidWeb={web guid}&guidFile={image guid}";5.8KViews1like1CommentRe: How to create Repost Page (Modern Page Library) with PowerShell
Hey Fabrice, I would recommend using PnP PowerShell as it has built-in methods to create and manipulate modern pages. The approach you've outlined assumes you've constructed the correct HTML for the canvascontent1 field...which is quite hard to do...The PnP team has built an API to manipulate modern pages and that API is also available via a series of PnP Powershell cmdlets. Checkout https://hangconsult.com/2017/11/05/creating-a-new-client-side-page-with-pnp-powershell/ to get a view on how PnP Powershell can help you. When it comes to creating the web part properties JSON the easiest approach is to configure your web part using the WorkBench (_layouts/workbench.aspx), clicking on "***Web part data" and then copying the contents from the webPartData node.10KViews1like6CommentsRe: Migrating HTML to Modern Pages - Looks great until page is edited, then content is lost
The easiest way to understand what's valid HTML is to create a piece of text using all the layout and formatting options you need. Once you've that you can grab the page list item and look at the canvascontent1 field to obtain the generated HTML. You'll see that only a limited number of styles are supported and fixed set of classes for color and size information. Anything else you use can be initially displayed but will be lost during edit.10KViews0likes10CommentsRe: Migrating HTML to Modern Pages - Looks great until page is edited, then content is lost
The pnp page transformation engine does handle the transformation from wiki html to modern text editor compliant html. As you've noted you can simply assign html and it will show, but in order to edit the html it must be compliant with what the text editor supports. See https://github.com/SharePoint/PnP-Tools/blob/master/Solutions/SharePoint.Modernization/SharePointPnP.Modernization.Framework/Transform/HtmlTransformator.cs for a starting basis for your own transformator.9.8KViews1like12CommentsSharePoint Patterns & Practices - General SP Dev SIG recording - 11th of January 2018
SharePoint Patterns and Practices (PnP) - General SharePoint Development Special Interest Group (SIG) bi-weekly call recording from January 11th meeting is now available from the PnP YouTube channel at http://aka.ms/sppnp-videos. Topics covered on January 11th, 2018 Introduction to Site Designs and Site Scripts - 7:30 DEMO - Detailed look at Site Designs and Site Scripts - Erwin van Hunen - 27:20 Resources Additional resources around the covered topics and links from the slides. Documentation of Site Designs and Site Scripts - https://aka.ms/spdev-site-design SharePoint Development documentation - http://docs.microsoft.com/sharepoint Have an issue with SharePoint Dev? Please let us know? - http://aka.ms/spdev-issues SharePoint PowerShell - http://aka.ms/sppowershell General SharePoint Dev Special Interest Group bi-weekly calls are targeted for anyone who's interested in the general SharePoint development topics. This included CSOM, REST, provisioning, PnP PowerShell, PnP Sites Core etc. topics. You can download recurrent invite from http://aka.ms/SPPnP-Core-SIG-Call. Welcome and join the discussion. If you have any questions, comments or feedback, feel free to provide your input as comments to this post as well.1.3KViews2likes0CommentsRe: Exception while executing code from PnP - CustomCssWeb
Which platform are you targetting: SPO? Which browser are you launching when you press F5 in Visual Studio? Are you a site collection administrator of the site you're installing into and is that site a developer site collection?1.5KViews0likes1CommentRe: Exception while executing code from PnP - CustomCssWeb
Can you uninstall the add-in by right clicking the SP project in VS. Once that's done try to deploy again using F5...you should get a prompt of SharePoint asking you to consent the add-in to use the permissions it requests. Without that consent done the add-in has no permissions, hence the access denied your seeing.1.5KViews0likes3CommentsRe: Certificate error
One last thing to doublecheck is how you've published the web app...from the guide: "When you publish the web application, remember to *uncheck *the option "Enable Organizational Authentication". If you leave this selected you migh face authentication issues when running the pnp-partner-pack" I've specifically addded that to the docs as I was having similar issues like you're seeing when I deployed the partner pack.11KViews0likes3CommentsRe: PnP Provisioning for community Site templete using PowerShell
If memory serves me correct there's some weird behaviour with the community template and this might be a bug. Would it be possible to log a bug in the issue list of the PnP-Sites-Core repository so that we can track this: https://github.com/OfficeDev/pnp-sites-core/issues. Thx.672Views0likes0CommentsRe: Easy Way To Develop Against REST in SharePoint
+1 on Tobias Zimmergren comment. Would also like to point you to the PnP YouTube channel which has a playlist for the Javascript Special Interest Group (SIG) in which the PnP-JS-Core library is discussed amongst things: https://www.youtube.com/playlist?list=PLR9nK3mnD-OXdcwfcHGsGr78nHWLRsv1x. The SIG has a recurring weekly meeting in which your more than welcome to partipate and help furhter evolve the PnP-Core-JS library: http://aka.ms/officedevpnpofficehours2.1KViews1like0Comments