youtube image
From YouTube: Building a safer custom Content Editor Web Part with SPFx

Description

In this 17-minute developer-focused demo, the question - what happened to the CEWP/SEWP’s in the move from classic to modern? Thanks to SPFx and presenter, the content web part is back. Built with a Governance, not a technical approach to address security and governance issues. Meet the Cherry-Picked Content web part. Uses only snippets (ships with 16) from approved libraries hardcoded in web part focusing user’s selections. Inject code directly into page or into an iFRame. Code uses a ContextualFragment. This PnP Community demo is taken from the Viva Connections & SharePoint Framework Bi-weekly sync call recorded on June 16, 2022.

Demo Presenter
• Christophe Humbert | @Path2SharePoint

Supporting materials
• Sample - Cherry picked content | https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-cherry-picked-content
• Article - Aiming for a safer Content Editor Web Part | https://blog.pathtosharepoint.com/2022/04/19/aiming-for-a-safer-content-editor-web-part/
• Sample - dangerous-content-web-part | https://github.com/PathToSharePoint/dangerous-content-web-part
• Issue - Make React-Script-Editor more secure #2228 | https://github.com/pnp/sp-dev-fx-webparts/issues/2228
• Tool – MGT | mgt.dev
• Sample - Script editor web part for modern pages built in React | https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor

Learn more
• Microsoft 365 Unified Sample gallery - https://aka.ms/m365/samples
• Microsoft 365 Platform Community in YouTube - https://aka.ms/m365/videos
• Microsoft 365 Platform Community - http://aka.ms/m365/community