Question

I am trying to use the code snippet webpart on a SharePoint Online Page. In order to test, I have written a single Header Tag

Heading

but for some reason it doesn't render on the page. It only shows the code on the page.

Is there any way to make the code render on the page?

Was it helpful?

Solution

The code editor web part is specifically designed to show source code on the web page.

So what you're seeing is by design. If you'd like to enter HTML to be displayed, there is no OOTB method that I'm aware of.

One option is to create a custom SPFx part, which enables to you render any HTML you want.

Of course, this is not a trivial undertaking and requires a developer skill set.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top