Forum Discussion

SG523's avatar
SG523
Brass Contributor
Feb 23, 2022

Multiline column turn off wrap text

I have a column of multiline text because some needs are longer than the 255 single line limit. The problem is I only need the data for some other operations and it makes the row very tall. Is there a way to turn off the wrap text for that column?

  • SG523 there isn't a setting for it but you can format the column with JSON to remove the wrap and just display the first line:

     

     

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

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    SG523 there isn't a setting for it but you can format the column with JSON to remove the wrap and just display the first line:

     

     

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

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

    • SG523's avatar
      SG523
      Brass Contributor
      That worked perfect, thank you!

Resources