How to wrap the text for a list column in MS SharePoint website?

Anonymous
2019-10-07T22:19:17+00:00

Hello, I am using MS SharePoint website. I created a column of 'multiple line of text'. I want to wrap the text for this column so that I can constrain the size of that column. 

I followed instructions mentioned on https://answers.microsoft.com/en-us/msoffice/forum/all/new-sharepoint-layout-columns-and-wrapping-text/601ed8ac-7096-42f1-a8f3-5d99fcb4e181 but they don't work for me. Please advise on how I can wrap the text for a column.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2019-11-02T22:57:25+00:00

    Dear Rahul,

    It seems that you can’t use the modern SharePoint experience in your environment. For the requirement, you may need to add the CSS code in the Script Editor web part on your site page. I find a code which may be applied to your environment for your reference.

    You need to first click on Edit page to see whether you can add the Script Editor web part. If no, you may need to contact your administrator and follow the steps in the article to enable custom script in SharePoint Online Management Shell first.

     

    After running the command, refresh the page and you should be able to add the web part. Then insert the following code in the web part to see the result.

    <style type="text/css">

    .ms-vb2 .ms-rtestate-field {

    max-width: 100px;

    max-height: 380px;

    overflow: hidden;

    }

    .ms-vb2 .ms-rtestate-field:hover {

    max-height: none;

    }

    </style>

    <h2>

    </h2>

    Before:

     

    After:

     

    Best Regards,

    Cliff

    1 person found this answer helpful.
    0 comments No comments

17 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-10-14T22:42:30+00:00

    Hello,

    I followed the instructions as per your suggestion. The only web part I can see is the list itself. Please refer to the following screenshot. I deleted the web part which means that the list was deleted. Then, I refreshed the list page>clicked on Home>clicked on the list. But I still don't see the 'Exist classic experience' option. 

    Following is the screenshot before I deleted the web part. You can see that there are no other web parts except for the list itself.

    Thank you for your help.

    0 comments No comments
  2. Anonymous
    2019-10-31T19:01:03+00:00

    Hello,

    Site Admin confirmed that the list I have is a classic list. Is there a way to wrap the text for the classic list? If yes, how can I wrap it? Thanks.

    0 comments No comments
  3. Anonymous
    2019-10-15T10:38:21+00:00

    Dear Rahul,

    Thanks for your updates.

    As there are no other web parts on the page, I suggest you contact the administrator in your company if you aren’t the administrator and go to List Settings>Advanced Settings to see if the Default experience for the site is checked. If no, check it, sign out of your account, wait some time and then sign into the site in SharePoint Online to see if the list is in the modern experience.

     

    You can also check if you can go to the modern experience with another refresh browser.

    After you get the modern experience, you should see the text is wrapped.

    If you want to see the full text, click on the column>Column settings>Format this column>insert the following code to check the result.

    {

    "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",

    "elmType": "div",

    "txtContent": "@currentField",

    "style": {

    "white-space": "normal",

    "padding": "11px 0"

    }

    }

    The result is showed as follows.

     

    Best Regards,

    Cliff

    0 comments No comments
  4. Anonymous
    2019-10-17T02:55:12+00:00

    Dear Rahul,

    Have you tried the suggestions above? Welcome to share any updates when you have time if you need further help on this issue.

    Best Regards,

    Cliff

    0 comments No comments