Forum Discussion
Script Editor in modern site
Khushi Shaikh Script Editors do not work because custom scripting is turned off. SPFx is the way. However, I would like to note, the calendar page is a classic page, so while this customization is unlikely to break... be aware, if you develop modern pages in the future, injecting code via script editors to change out of the box components isn't supported. With great power, comes great responsibility.
Here is a modern script editor built in SPFx by the community.
https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-script-editor
Thanks for the link Beau Cameron I am looking to do things in right way. After looking at Github's SPFX Script Editor, it seems is not a correct way to do it. Is there any way as per the best practices to edit the calendar page to edit the HTML using SPFX?
Best Regards,
Khushi
- Beau CameronJan 06, 2021MVP
Khushi Shaikh Nope. There is no recommended path for that. My personal recommendation is if you need a custom calendar, to build the custom calendar in SPFx. There are some samples in the PnP Samples library. https://github.com/pnp/sp-dev-fx-webparts