SharePoint 2019 - communication site

Mateusz Janyszko 20 Reputation points
2023-12-15T08:52:02.7533333+00:00

Hello!

I would like to know that, in SharePoint 2019 exist possibility to insert CSS file/code? I'm not an administrator, I'm just owner of communication site. Before migration I worked with SP2013, and there I used a script editor, but now it is impossible even to add script editor web part by admin(security reasons). If anyone knows or have an idea how to do this please let me know.
Can an administrator add for users/sites owners possibility to use script editor or script link? This require additional tasks from an administrator side ?

Br,
Mat

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,481 Reputation points Microsoft External Staff
    2023-12-18T03:18:22.05+00:00

    Hi @Mateusz Janyszko

    Script editor web part and the Content editor web part are not available in SharePoint modern page. As a workaround, you could use spfx in SharePoint 2019 to deploy css code.

    SharePoint 2019 need some diferent version in the document. Please make a reference.

    https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-2019-and-subscription-edition-support

    You could deploy the following solution to create a custom webpart which has the same function with script editor.

    https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor-onprem


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.