Forum Discussion

BeaUserWay's avatar
BeaUserWay
Copper Contributor
Oct 24, 2021

Add script to sharepoint page

I've tried adding a script using "Code snippet" element but it doesn't show. I've read that SharePoint only accepts iframes, no scripts for security reasons.

 

Just wondering if there's any way I can edit the Page Source to add this code?

 

I've watched old tutorials on YouTube and it seems that before you could do that.

 

Thanks, 

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    BeaUserWay in earlier on-premise versions of SharePoint there was the script editor. That is not available in SharePoint Online out-of-the-box it's on a modern page not possible to add scripts. On a classic page it's still possible to use the script editor but the settings have to be switch on by your tenant admin (though most IT departments won't allow it in my experience). Info on this is here.

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

     

Resources