Forum Discussion
How can I add the following code into SharePoint?
<head>
<!-- Start of it-hedera Zendesk Widget script -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=aad905da-9320-42c9-b106-cf2234d0d423"> </script>
<!-- End of it-hedera Zendesk Widget script -->
</head>
I found out that I can add a web part site page and from there choose the option for "Media and Content -> Content Editor" and then edit the HTML and get the java script added in that manner.
Here's a YouTube video that can help for reference: https://www.youtube.com/watch?v=LRreGP3g0Mg
Thanks ya'll for your responses.
Ondas_Santos wrote:<head>
<!-- Start of it-hedera Zendesk Widget script -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=aad905da-9320-42c9-b106-cf2234d0d423"> </script>
<!-- End of it-hedera Zendesk Widget script -->
</head>
3 Replies
- Ondas_SantosCopper Contributor
I found out that I can add a web part site page and from there choose the option for "Media and Content -> Content Editor" and then edit the HTML and get the java script added in that manner.
Here's a YouTube video that can help for reference: https://www.youtube.com/watch?v=LRreGP3g0Mg
Thanks ya'll for your responses.
Ondas_Santos wrote:<head>
<!-- Start of it-hedera Zendesk Widget script -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=aad905da-9320-42c9-b106-cf2234d0d423"> </script>
<!-- End of it-hedera Zendesk Widget script -->
</head>
- Stephen CallinCopper Contributor
You can use an SPFx extension - if that's an option. There's a community sample that injects a css link to the head, it could easily be modified to add a script tag instead.
https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/react-application-injectcss
- I guess you are trying to add in a modern SPO site so out of the box there is no way to add a script / HTML snippet like this one...there is a free SPFx WebPart that works like the Content Editor WebPart that could work here