Forum Discussion
HTML code embed into SharePoint Online page
- Aug 25, 2022
Hi Thomsch
Another possible solution is to have your HTML code on external URL and use it as an iframe inside out of box Embed web part.
For more info, please see: https://support.microsoft.com/en-us/office/add-content-to-your-page-using-the-embed-web-part-721f3b2f-437f-45ef-ac4e-df29dba74de8
Thanks in advance
Thomsch, back in the day I used this page to set it up. In theory it still works. https://www.spguides.com/script-editor-web-part-sharepoint-2016/
- ganeshsanapAug 25, 2022MVP
Thomsch There is no SharePoint default web part to add HTML to modern pages in SharePoint.
As stated by dcancelos, you can use the modern script editor web part to add HTML to modern pages.
Here are two useful modern script editor web parts developed using SPFx:
- Modern CEWP by SPJS - Ready made SPFx .sppkg file
- react-script-editor - You can download the code & build SPFx package
Once you get the .sppkg file package, you can deploy it on app catalog & then use the web part on your SharePoint sites. Refer steps for building & deploying package:
- Build your first SharePoint client-side web part
- Deploy your client-side web part to a SharePoint page
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.