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 displayed as shown below and the text is cut off. If you know how to display multiple lines so that the entire text can be displayed, I would appreciate it if you could tell me.
*Sharepoint is made on the communication site.
< Image >
3 Replies
Sort By
- Aswer123Copper 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!
- itshankwillsaysCopper Contributor
I completely understand your concern about the character limit in the tile view of the Document Card Designer in SharePoint. It can be frustrating when important details get truncated. While there isn't a built-in solution to increase the text display, I recommend using shorter titles for clarity and considering tooltips for additional context. Additionally, providing feedback to Microsoft online about this limitation could help influence future updates.
- YMMYCopper Contributor
Dear itshankwillsays-san,
Thank you for your comment and kind support!
Your advice really helped me !