Forum Discussion
How to add HTML to sharePoint online
Thomas Berman wrote:
If you're on classic pages, you can add a Content Editor Web Part which points to your HTML file, which in turn loads your JavaScript files.
On modern pages, you can:
- Create an SPFx web part that does what you need
- Create an SPFx full page application
- Use Mikael Svenson's SPFx Script Editor web part: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor
The proper way is to create a new SPFx webpart with the html/script. There are many security reasons why using my web part or the the old classic ones are a bad idea.
Just to be clear before you go any which way just because you can 😀
Mikael Svenson Hi I am trying to add a tab menu on my SP page, on Modern SP, do I need to do all this just to add that? below
On modern pages, you can:
- Create an SPFx web part that does what you need
- Create an SPFx full page application
- Use @Mikael Svenson's SPFx Script Editor web part: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor
- MikaelSvensonMar 02, 2023
Microsoft
What do you want to accomplish in terms of tab UX and what happens when you click them. First evaluate existing web parys in SharePoint Online. Next look at open source samples at https://pnp.github.io/sp-dev-fx-webparts/. As a last resort maybe the script editor web part (part of the samples).
All part of ROI.