Forum Discussion

thanhtien19's avatar
thanhtien19
Iron Contributor
Feb 19, 2024
Solved

How to add javascript to sharepoint online Modern Page

I am using old sharepoint then can add javascript function ChatLink(myMessage) to when user click then can add username to deeplink chat teams <a href="javascript&colon;ChatLink(&#39;IT&#39;)">Chat - Microsoft Teams</a>

But when create Sharepoint Online Modern then i can not add java script. I want when user click hyperlink (as quick links....) then will open deep link chat with groupname + username .

  • thanhtien19 Microsoft have purposefully locked down modern SharePoint sites to prevent a lot of the customisation that was previously available in older versions. However you can create web parts with the SharePoint Framework SPFx or download samples from github at https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples where there are instructions for downloading and installing them. Also, there is a modern script editor web part available from Add an app in the SharePoint menu.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

7 Replies

Resources