Embed Code

%3CLINGO-SUB%20id%3D%22lingo-sub-1851533%22%20slang%3D%22en-US%22%3EEmbed%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1851533%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20do%20we%20embed%20this%20code%20in%20a%20sharepoint%20site%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3CA%20href%3D%22https%3A%2F%2FURL%22%20class%3D%22fbo-embed%22%20data-fbo-id%3D%22416430%22%20data-fbo-lightbox%3D%22yes%22%20data-fbo-width%3D%22250px%22%20data-fbo-height%3D%22188px%22%20data-fbo-version%3D%221%22%20style%3D%22max-width%3A%20100%25%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EDocument%20Name%3C%2FA%3E%3CSCRIPT%20async%3D%22%22%20defer%3D%22%22%20src%3D%22https%3A%2F%2Furl.com%2FEmbedScriptUrl.aspx%3Fm%3Dredir%26amp%3Bhid%3D416430%22%3E%3C%2FSCRIPT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1851853%22%20slang%3D%22en-US%22%3ERe%3A%20Embed%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1851853%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F856668%22%20target%3D%22_blank%22%3E%40agukmm%3C%2FA%3E%26nbsp%3BIf%20you%20are%20using%20SharePoint%20online%20(modern%20experience)%20then%20you%20can%20use%26nbsp%3B%3CSTRONG%3EEmbed%3C%2FSTRONG%3E%20webpart%20to%20embed%20the%20code%20on%20SharePoint%20page.%3C%2FP%3E%3CP%3E%3CSTRONG%3EReference%3C%2FSTRONG%3E%3A%26nbsp%3B%3CA%20title%3D%22Add%20content%20to%20your%20page%20using%20the%20Embed%20web%20part%22%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fadd-content-to-your-page-using-the-embed-web-part-721f3b2f-437f-45ef-ac4e-df29dba74de8%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAdd%20content%20to%20your%20page%20using%20the%20Embed%20web%20part%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20SharePoint%20on-premise%20or%20classic%20experience%20in%20SharePoint%20online%20then%20you%20can%20use%26nbsp%3B%3CSTRONG%3EScript%20Editor%3C%2FSTRONG%3E%20or%26nbsp%3B%3CSTRONG%3EContent%20Editor%3C%2FSTRONG%3E%20webpart%20to%20embed%20the%20code%20on%20page.%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%20%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2033765%22%20slang%3D%22en-US%22%3ERe%3A%20Embed%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2033765%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F856668%22%20target%3D%22_blank%22%3E%40agukmm%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUse%20the%20Embed%20Code%20web%20part%20and%20an%20iframe%20is%20required.%20You%20wither%20have%20to%20just%20put%20the%20link%20you%20want%20to%20embed%20or%20use%20an%20iframe.%20What%20you%20are%20trying%20to%20do%20isn't%20possible%20with%20the%20Embed%20Code%20web%20part%20as%20is%20and%20the%20solution%20may%20or%20may%20not%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20add%20that%20code...%3C%2FP%3E%3COL%3E%3CLI%3Ecreate%20an%20html%20document%20with%20that%20code%20inside%20it%20and%20store%20the%20html%20doc%20on%20your%20SharePoint%20site.%3C%2FLI%3E%3CLI%3EGet%20the%20URL%20to%20the%20html%20document%3C%2FLI%3E%3CLI%3EEmbed%20that%20link%20in%20the%20Embed%20Code%20web%20part.%26nbsp%3B%3CBR%20%2F%3ENOTE%3A%20I%20would%20say%20use%20the%20iframe%20route%20but%20it%20doesn't%20seem%20to%20work.%20If%20you%20just%20put%20the%20link%20it%20should%20mostly%20work%20but%20you%20may%20find%20that%20it%20doesn't%20do%20what%20you%20want%20it%20to.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EThe%20Embed%20Code%20web%20part%20is%20a%20big%20disappointment.%20It%20is%20fine%20for%20embedding%20videos%20but%20not%20for%20custom%20code%20snip-its.%20I%20wish%20Microsoft%20would%20change%20it%20but%20they%20seem%20more%20worried%20about%20the%20security%20of%20ignorant%20users...%20(on%20internal%20sites%20no%20less).%20%3Aface_with_rolling_eyes%3A%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

How do we embed this code in a sharepoint site?

 

<a href="https://URL" class="fbo-embed" data-fbo-id="416430" data-fbo-lightbox="yes" data-fbo-width="250px" data-fbo-height="188px" data-fbo-version="1" style="max-width: 100%">Document Name</a><script async defer src="https://url.com/EmbedScriptUrl.aspx?m=redir&hid=416430"></script>

 

3 Replies

@agukmm If you are using SharePoint online (modern experience) then you can use Embed webpart to embed the code on SharePoint page.

ReferenceAdd content to your page using the Embed web part 

 

If you are SharePoint on-premise or classic experience in SharePoint online then you can use Script Editor or Content Editor webpart to embed the code on page.


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

@agukmm

 

Use the Embed Code web part and an iframe is required. You wither have to just put the link you want to embed or use an iframe. What you are trying to do isn't possible with the Embed Code web part as is and the solution may or may not work.

 

If you want to add that code...

  1. create an html document with that code inside it and store the html doc on your SharePoint site.
  2. Get the URL to the html document
  3. Embed that link in the Embed Code web part. 
    NOTE: I would say use the iframe route but it doesn't seem to work. If you just put the link it should mostly work but you may find that it doesn't do what you want it to.

The Embed Code web part is a big disappointment. It is fine for embedding videos but not for custom code snip-its. I wish Microsoft would change it but they seem more worried about the security of ignorant users... (on internal sites no less). :face_with_rolling_eyes:

@agukmm 

Please note that if you are using an iframe, the source has to be approved in that specific site as "trusted sites" to be loaded from your SharePoint site.

Yours sincerely,
Aref Halmstrand