So I was having a play around with the new Modern Experience site pages and while it's pretty slick and looks great (as well as fixing the issues with container layouts being a royal pain to change about), dissapointed the Embed web part only allows iframes and not Javascript.

Did a bit of reading up and it seems MS are using this to push everyone to using SPFx, which I did have a play about with but it seems horrendously complicated (at least for me right now while keeping up with everything else). As far as I can tell, you can wrap whatever JS you want in an SPFx WP, so an idea occurred to me...

Would it be feasible to create a basic WP in SPFx with no real configuration or WP properties, and just use this as a template to insert whatever custom JS I need to run? If so, what's the best way to go about this?

Basically looking for a 'as little config as possible' way of getting JS onto Modern pages; the sooner we get used to this the better as I feel there's going to be a lot of clients within the next while needing their Classic pages updated when MS eventually ditch Classic.

1 Answer 1


This web part has already been created. but read General thoughts on a modern script editor webpart before you use it.

  • Nice one, thanks Per. I did think it pretty likely some other clever clogs had beat me to it. :) Sep 5, 2017 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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