0

I am working on a sharepoint online classic team sub-site, and i added the React Script Editor webpart from https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor to allow me to add custom scripts inside modern pages. so i went to the sub-site's site content link >> i add the web part app, as follow:-

enter image description here

After that i reference the web part inside the sub-site's home page, and i added a javascript inside it. then i tried to save the sub-site as template but i got this error:-

Sorry, something went wrong Sorry, this site can't be saved as a template. It contains apps that don't work in templates: Modern Script Editor web part by Puzzlepart

as follow:-

enter image description here

so my question is:- if there is a way to add the web part to my sub-site and at the same time to be able to save the sub-site as template?

Thanks

1

It’s by design that save site as template with certain custom apps in SharePoint Online or SharePoint server 2013.

You can remove the app when save the sub site as template, then re-add it in the new site.

  • i did not try to remove the app and try to re-save.. even if this will work, what i were trying to achieve is add some custom JavaScripts inside the react-scrit-editor web part,, and have them saved inside the site template.. similar to how the on-premises code snippet web part work... – john Gu Sep 20 '18 at 15:59

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.