Forum Discussion
Thomsch
Aug 25, 2022Iron Contributor
HTML code embed into SharePoint Online page
A colleague of mine is using a HTML code on the current SharePoint on-prem 2013 environment to place svg graphics onto another SVG image. Is it still possible to embed an HTML code into a SharePo...
- 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
Thomsch
Aug 25, 2022Iron Contributor
Great! How can I add such a non-official webpart into SharePoint Online?
Thanks in advance
Thanks in advance
dcancelos
Aug 25, 2022Copper Contributor
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.