JSON string forcing column rows to show all text in a SharePoint List?

Per Magnus Byström 1 Reputation point
2021-01-28T09:09:33.037+00:00

Can anyone recommend a JSON string for forcing rich text column rows to view all text in a SharePoint List in view mode?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,175 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChelseaWu-MSFT 6,331 Reputation points
    2021-01-29T01:48:33.497+00:00

    Here is a sample script to show entire text in a column field:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
        "white-space": "normal",
        "padding": "10px 0"
      }
    }
    

    However, it is not recommended to use Rich text fields with JSON formatting since they return their values with encoded HTML. You can turn off "Use enhanced rich text" under Edit column menu so that the column values will show as plain text.

    Reference: Formatting column with long text to multiple-line with word wrap.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    **Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **

    3 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.