Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top