Unable to add Modern Script editor inside our modern communication site

john john 926 Reputation points
2020-11-26T11:40:53.707+00:00

I am trying to add the following Modern Script editor web part @ react-script-editor inside our communication site.

Where i followed the steps for deployment which are:-

  1. Clone this repository
  2. In the command line run: - npm install - gulp serve
  3. gulp clean
  4. gulp bundle --ship
  5. gulp package-solution --ship
  6. Upload .sppkg file from sharepoint\solution to your tenant App Catalog

Also since i am deploying this to a communication modern site which is non-script site, so i change this "requiresCustomScript": false inside the http://scripteditorwebpart.manifest.json/ before i run the above 2 --ship commands

  1. i added the App inside our app catalog site:-

42830-productid.png

  1. Then i added the App inside our communication modern site collection, as follow:-

42900-got-added.png

  1. But when i edit a modern page >> i can not find the web part:-

42858-modern.png

any advice? Thanks

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,565 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-11-27T06:46:00.22+00:00

    You need to enable script editing in this modern site,
    The command for your reference:

    Connect-SPOService -Url https://contoso-admin.sharepoint.com   
     Set-Sposite -Identity modernsiteUrl -DenyAddAndCustomizePages 0  
    

    Here is a video on how to install modern script editor in modern site for your reference:
    https://www.youtube.com/watch?v=Fz3NeLLKrpE


    If the response is helpful, please click "Accept Answer" and upvote it.
    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.