Forum Discussion
YMMY
Nov 01, 2024Copper Contributor
About SharePoint document library feature (tile view using the Document Card Designer)
I want to display thumbnails and information in the tile view using the document card designer in the SharePoint document library function, but if the number of characters is too long, "・・・" is displ...
Aswer123
Jan 16, 2025Copper Contributor
To display the full text on multiple lines in the tile view of a SharePoint document library using the document card designer, you can use a JSON formatting customization to override the default behavior of truncating text. Here’s how you can do it:
Steps to Enable Multi-Line Text Display:
- Go to the Document Library: Navigate to the document library where you want to apply the changes.
- Open the View Settings:
- Click on the gear icon (settings) in the top right.
- Select Library settings.
- Under the Views section, click on the view you want to customize (e.g., All Documents).
- Customize Tiles View with JSON:
- Switch to the Tiles View.
- In the command bar, click on the View dropdown (e.g., "All Documents"), then select Format current view.
- Click Advanced mode to enter JSON code.
- Apply JSON Code: Use the following JSON code to display multi-line text for a specific column (e.g., "Title"):{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "additionalRowClass": "", "cardFields": [ { "field": "Title", "style": { "overflow": "visible", "white-space": "normal", "word-wrap": "break-word" } } ], "hideSelection": true }
- Save and Preview:
- Click Save to apply the changes.
- Preview the tiles view and confirm that the text now wraps onto multiple lines instead of being truncated.
Notes:
- Replace "Title" in the JSON code with the internal name of the field you want to display on multiple lines.
- If you want to adjust the height or width of the tile to accommodate longer text, you can add CSS properties like min-height or width in the style block.
Let me know if you encounter any issues!