SOLVED

How can I add the following code into SharePoint?

%3CLINGO-SUB%20id%3D%22lingo-sub-655773%22%20slang%3D%22en-US%22%3EHow%20can%20I%20add%20the%20following%20code%20into%20SharePoint%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655773%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C!--%20Start%20of%20it-hedera%20Zendesk%20Widget%20script%20--%3E%3C%2FP%3E%3CP%3E%3CSCRIPT%20id%3D%22%26quot%3Bze-snippet%26quot%3B%22%20src%3D%22%26quot%3B%26lt%3BA%22%20href%3D%22https%3A%2F%2Fstatic.zdassets.com%2Fekr%2Fsnippet.js%3Fkey%3Daad905da-9320-42c9-b106-cf2234d0d423%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstatic.zdassets.com%2Fekr%2Fsnippet.js%3Fkey%3Daad905da-9320-42c9-b106-cf2234d0d423%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20%3C%2FSCRIPT%3E%3C%2FP%3E%3CP%3E%3C!--%20End%20of%20it-hedera%20Zendesk%20Widget%20script%20--%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655872%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20add%20the%20following%20code%20into%20SharePoint%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655872%22%20slang%3D%22en-US%22%3EI%20guess%20you%20are%20trying%20to%20add%20in%20a%20modern%20SPO%20site%20so%20out%20of%20the%20box%20there%20is%20no%20way%20to%20add%20a%20script%20%2F%20HTML%20snippet%20like%20this%20one...there%20is%20a%20free%20SPFx%20WebPart%20that%20works%20like%20the%20Content%20Editor%20WebPart%20that%20could%20work%20here%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-656414%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20add%20the%20following%20code%20into%20SharePoint%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-656414%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F351356%22%20target%3D%22_blank%22%3E%40Ondas_Santos%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20an%20SPFx%20extension%20-%20if%20that's%20an%20option.%26nbsp%3B%20There's%20a%20community%20sample%20that%20injects%20a%20css%20link%20to%20the%20head%2C%20it%20could%20easily%20be%20modified%20to%20add%20a%20script%20tag%20instead.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-extensions%2Ftree%2Fmaster%2Fsamples%2Freact-application-injectcss%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-extensions%2Ftree%2Fmaster%2Fsamples%2Freact-application-injectcss%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-665336%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20add%20the%20following%20code%20into%20SharePoint%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-665336%22%20slang%3D%22en-US%22%3E%3CP%3EI%20found%20out%20that%20I%20can%20add%20a%20web%20part%20site%20page%20and%20from%20there%20choose%20the%20option%20for%20%22Media%20and%20Content%20-%26gt%3B%20Content%20Editor%22%20and%20then%20edit%20the%20HTML%20and%20get%20the%20java%20script%20added%20in%20that%20manner.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20a%20YouTube%20video%20that%20can%20help%20for%20reference%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLRreGP3g0Mg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLRreGP3g0Mg%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20ya'll%20for%20your%20responses.%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F351356%22%20target%3D%22_blank%22%3E%40Ondas_Santos%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C!--%20Start%20of%20it-hedera%20Zendesk%20Widget%20script%20--%3E%3C%2FP%3E%3CP%3E%3CSCRIPT%20id%3D%22%26quot%3Bze-snippet%26quot%3B%22%20src%3D%22%26quot%3B%26lt%3BA%22%20href%3D%22https%3A%2F%2Fstatic.zdassets.com%2Fekr%2Fsnippet.js%3Fkey%3Daad905da-9320-42c9-b106-cf2234d0d423%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstatic.zdassets.com%2Fekr%2Fsnippet.js%3Fkey%3Daad905da-9320-42c9-b106-cf2234d0d423%26amp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B%26amp%3Bamp%3Bamp%3Bgt%3B%20%3C%2FSCRIPT%3E%3C%2FP%3E%3CP%3E%3C!--%20End%20of%20it-hedera%20Zendesk%20Widget%20script%20--%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

<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
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

@Ondas_Santos 

 

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

best response confirmed by Ondas_Santos (New Contributor)
Solution

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>