how to edit SharePoint online modern page using custom css code

Mohammad Omar Alqatawna 0 Reputation points
2024-01-10T15:42:24.11+00:00

i tried to edited page style just like color change the font and things like that
i need all site affected by the change so the script editor not enough

need to edit some thing like saidnav and search bar
Screenshot 2024-01-10 170907

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-01-11T01:53:54.3033333+00:00

    Hi @Mohammad Omar Alqatawna, As the script editor web part is not supported in modern SharePoint, We have SPFx based react script editor web part to add custom CSS or JavaScript to modern SharePoint Online pages.

    https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor If you want to deploy the solution, you could refer to the following document https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part

    ---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.


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.