0

I am using PNP modernization framework (.net) to transform classic SharePoint online publishing pages to modern client side pages.

The classic publishing page contains content editor web part in which HTML markup is written with CSS class names and the CSS file is referenced in the script editor web part that exists in the same page.

As there is no script editor web part in modern site so i am using community script editor to transform the script editor web part. I am also using community script editor web part to transform the content editor web part from the classic publishing page.

I am able to successfully transform the classic page to modern however when i open the transformed client side page in edit mode the sections on the page automatically converts to the text editor web part and the custom CSS classes are lost.

Did someone faced similar issue or can guide me how can i fix this issue ?

This is kind of urgent and quick response will be highly appreciated. Let me know if more details are required.

Many Thanks.

1

For Modern Page, it's suggested to deploy and use Modern Script Editor Web Part to add custom CSS/Javascript in the page, here is a detailed video demo in Youtube for your reference:

How To Install React Script Editor Webpart in Modern Sharepoint Sites Step by Step Full Information

Here is the source code from GitHub:

Script editor web part for modern pages built in React

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.