JSON in Sharepoint: Button with embedded link in JSON language

Gollnast, Viktoria 21 Reputation points
2022-10-07T06:19:14.533+00:00

How do I use JSON to deposit a button with an embedded link to a Microsoft Stream Video on my Sharepoint page?

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,251 Reputation points
    2022-10-07T08:57:30.073+00:00

    Hi @Gollnast, Viktoria ,

    According to my research and testing, you can use the following JSON to create a button with a link:

    {  
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",  
       "elmType": "a",  
       "txtContent": "Click",  
       "attributes": {  
          "target": "_blank",  
          "href": "https://xxxxxx"  
       },  
           "style": {  
            "padding": "0px 25px",  
            "cursor": "pointer",  
            "border": "none",  
            "color": "white",  
            "font-weight": "550",  
            "background-color": "#0078d4",  
            "text-decoration": "none",  
            "font-size": "14px",  
            "text-align": "center",  
            "width": "40px"  
        }  
    }  
    

    My test result:
    248453-image.png

    Hope it can help you. Thanks for your understanding and support.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.