In this SharePoint tutorial, we will discuss how to use the sharepoint script editor web part. We will see, how to use the script editor web part in sharepoint online and SharePoint 2013/2016/2019. Also, we will see, how to enable script editor webpart in sharepoint online.
Previously there were content editor web parts to write HTML and scripts inside a web part page in SharePoint 2013/2016/2019 and SharePoint Online.
Microsoft introduced a special web part known as a script editor web part in SharePoint 2013. The web part is designed to add scripts inside a web part page in SharePoint 2013/2016/2019 or SharePoint Online. We can also add HTML content into a script editor web part in SharePoint.
To add a script editor web part make sure you have permission to edit the SharePoint page. Sometimes if you are working on a subsite, even if you are an owner of the subsite, you will not see the web part categories while editing the page.
To add a script editor web part, edit the SharePoint web part page, then from the Ribbon click on INSERT -> Web Part -> then from the categories select Media and Content and then choose Script Editor web part as shown in the fig below:
Once you add the script editor web part into the SharePoint web part page, you can see the EDIT SNIPPET button.
I have also created a complete video tutorial on the sharepoint script editor web part, do check it out.
Now, let us see, how to enable script editor web part in SharePoint Online Office 365. In the same way, we can enable content editor web part in SharePoint Online Office 365.
The content editor and Script editor web part were missing in SharePoint Online Office 365 sites. Here we will discuss, how we can enable custom script at Office 365 tenant level for SharePoint Online sites.
Enable script editor web part in SharePoint Online Office 365
Recently one of my teammates faced one issue in Office 365 SharePoint online site. She recently signed up for an Office 365 SharePoint Online trial. Then she created a SharePoint Online team site, but when she edited the web part page and try to add a script editor or content editor web part, she was not able to see all the web parts in the Ribbon (Insert -> Web Part -> Categories).
The script editor web part and content editor web part were missing in SharePoint Online site, See fig below:
Microsoft recently did one update, according to which the scripting capabilities are disabled by default for personal sites and self-service created sites in SharePoint Online Office 365. This behavior is intended to reduce the security risk of allowing users to insert custom scripts into SharePoint Online sites.
By default, in Office 365 SharePoint Online, custom scripts are disabled in Office 365 SharePoint Online. But we can enable custom script in Office 365 tenant level.
Login to your Office 365 Portal. Then Go to the SharePoint Admin Center.
Then go to Settings. If you can not see the Settings link then write Settings in the search box and click on Enter. In the search result click on the desired Settings link like below:
Then in the Settings page, go to the Custom Script section. By default, “Prevent users from running custom script on personal sites” and “Prevent users from running custom script on self-service created sites” will be selected.
Now select the radios button “Allow users to run custom script on personal sites” and “Allow users to run custom script on self-service created sites“. See fig below
Now click on OK. Once you save the page it may take up to 24 hours to reflect the changes.
Once it is reflected, you can edit a web part page in SharePoint Online and click on Add a web part, and you can see script editor and content editor web parts will be available in SharePoint Online Office 365.
You may like the following SharePoint web part tutorials:
- How to use SharePoint date filter web part in SharePoint Online/2016/2013
- Quick Chart Web Part in Modern SharePoint Online Site
- Picture Library Slideshow Web Part in SharePoint Online
- Enable Chart Web Part in SharePoint
- SharePoint crud operations using jsom
- SharePoint Image Web Part
I hope this will be helpful to know more about the Script editor web part in SharePoint Online or SharePoint 2013/2016. Also, also we saw how to enable content editor webpart in sharepoint online or enable script editor webpart in sharepoint online.
This will fix the below issues:
- sharepoint script editor
- sharepoint script editor web part
- sharepoint 2013 script editor web part
- script editor sharepoint
- script editor web part sharepoint online
- script editor web part
- script editor sharepoint online
- enable script editor webpart in sharepoint online
- sharepoint online script editor web part missing
- enable content editor webpart in sharepoint online
- modern script editor web part not showing sharepoint online
- content editor web part missing in sharepoint online
- sharepoint script editor web part missing
- sharepoint content editor web part missing
- how to enable content editor webpart in sharepoint online
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Out audiences are from the United States, Canada, United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a SharePoint MVP(8 times), check out My MVP Profile. I have also worked in companies like HP, TCS, KPIT, etc.