Forum Discussion
Dc111222
May 21, 2021Copper Contributor
Sharepoint list how to wrap text in gallery view
Hi. Can anyone tell me how to format text when viewing in gallery mode so that the text wraps within the tile? Guessing this is probably some JSON coding?
uttam27
Aug 22, 2022Copper Contributor
Please try changing the line 19 from:
"white-space": "break-word"
to:
"word-break": "keep-all"
My apologies, I am also not expert in this, but this is something I found that helped me recently.
TammyVonglis
Sep 28, 2022Copper Contributor
uttam27 Can you give me the for dummies? Where do I insert this JSON? Thank you!!!
- ganeshsanapSep 29, 2022MVP
TammyVonglis For gallery view, you have to use the View formatting option in list and add your JSON code in gallery/tile view JSON in advanced mode.
Follow this Microsoft official documentation for more information: Gallery layout customization
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.
- TammyVonglisSep 28, 2022Copper ContributorUgh, ok, I got where I needed to get to and it still isn't wrapping in gallery view. Other views, yes.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "p",
"style": {
"text-align": "justify",
"height": "150px",
"word-break": "keep-all"
},
"txtContent": "@currentField"
}