Nov 15 2021 11:26 AM
Using SharePoint Online, and we have a list with a column that is formatted as a clickable email address. While all the other columns are some nice font, like Segoe or something, this email column is Times New Roman and it looks awful, but I have been unsuccessful in using JSON to format it.
I've tried adding this to the formatting, but it remains TNR:
Nov 16 2021 02:32 AM
@Drogon365 I have used below JSON & it is working fine for me.
Example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "https://google.com/"
},
"style": {
"font-family": "Segoe UI"
}
}
Output:
Try using similar JSON styles & let me know if it works for you.
Also, are you using column formatting as well as view formatting in the same list?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Nov 16 2021 06:45 AM - edited Nov 16 2021 06:46 AM
@ganeshsanap That didn't work for me. I used:
Nov 16 2021 09:28 PM
@Drogon365 Try copy pasting below JSON as it is & let me know if it works for you:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "a",
"txtContent": "@currentField",
"style": {
"font-family": "Segoe UI",
"font-size": "12px"
},
"attributes": {
"iconName": "Mail",
"href": {
"operator": "+",
"operands": [
"mailto:",
"@currentField"
]
}
}
}
]
}
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.