Forum Discussion
Frank Nielsen
Feb 06, 2019Copper Contributor
Code snippet web part
Hi SharePoint gurus. I have a SharePoint Modern page where I want to hide the header of a web part. I have taken out the ID of the header and used the code snippet web part, but the header is still ...
- Feb 06, 2019
As others have mentioned, the code snippet web part just displays code, it doesn't execute it.
You should also be aware that trying to override out of the box styles is not good practice. Those IDs are subject to change and they will change as they are dynamically generated.
Amanda Downing
Jul 08, 2019Brass Contributor
From my perspective the Code Snippet web part does work. It allows you to share pieces of code. It isn't meant to act as a window to run code, but a means of sharing pieces of code in a visual manner.
gerhard91
Jul 26, 2023Copper Contributor
Amanda DowningThe main problem for me is, that after publishing the code via the code snippet web part, it cannot be copied (Strg+C) from the sharepoint site. For the browser is looks like a picture.
Does someone have a solution for this?