How can I use JSON to format a Teams List Multiline Text so that in the list view only the top lines are visable

smahlerle 0 Reputation points
2024-07-22T08:02:39.6366667+00:00

I want to use JSON to format a Teams List Multiline Text so that in the list view only the top lines are visible

Therefore I tried this JSON script that I found here

{

"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",

"debugMode": true,

"elmType": "div",

"children": [

  {

 "elmType": "div",

    "txtContent": "@currentField",

    "style": {

             "padding":"11px 8px",

             "max-height":"64px",

            "overflow-y":"auto",

            "align-items":"flex-start"

     }

  }

]

}

But this that my column view looks like this

Image

How can I do this so that no html code is visible

Or

Simply - how can I limit the visible lines in the list view

Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-07-23T01:24:01.5166667+00:00

    Hi @smahlerle

    From the Formatting column with long text to multiple-line with word wrap site:

    It is not recommended to use rich text fields with List Formatting.

    And according to this Microsoft article, multi-line text column with enhanced rich text is not supported within JSON column formatting.

    So I suggest you apply JSON formatting to plain text column.

    If you want this by OOTB, I suggest you can raise a thread in the SharePoint feedback portal.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.



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.