Forum Discussion
How to add javascript to sharepoint online Modern Page
- Feb 19, 2024
thanhtien19 Microsoft have purposefully locked down modern SharePoint sites to prevent a lot of the customisation that was previously available in older versions. However you can create web parts with the SharePoint Framework SPFx or download samples from github at https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples where there are instructions for downloading and installing them. Also, there is a modern script editor web part available from Add an app in the SharePoint menu.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
thanhtien19 I have previously achieved this using Script editor web part for modern pages developed by @Mikael Svenson using SPFx.
Check my answers on this thread for more information and how to use the web part:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap yes that was the one I was referring to above, it's pretty good.