Forum Discussion
amccormack
Sep 01, 2022Former Employee
SharePoint - Wrap text in gallery view
Hi All,
Been scouring a while now looking for an answer. I've seen a lot of posts about this but cannot get anything to work. I am trying to get the 'new title' column to wrap the text so the e...
ALOE_2023
Mar 12, 2024Copper Contributor
bakline amccormack I was able to get the title to wrap using a combo of white-space and word-break. I think what was key was placing the code below "txtContent."
"elmType": "p",
"attributes": {
"title": "[$Title]",
"class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
"role": "heading",
"aria-level": "3"
},
"txtContent": "=if ([$Title] == '', '–', [$Title])",
"style":{
"white-space": "wrap",
"word-break": "keep-all"}
Here is how this looks in practice:
kskyllingmark
Apr 30, 2024Copper Contributor
How to get text to wrap in the column headers also?