0

As we know that there is no word wrap facility available in Title column in SharePoint list.

Although, we can add word wrap functionality by adding JSON code chunks.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "[$Title]",
  "customRowAction": {
    "action": "editProps"
  },
  "style": {
    "cursor": "pointer",
    "word-wrap": "break-word",
    "text-align": "left",
    "font-family": "calibri",
    "font-size": "11.5pt",
    "color": "black"
  }
}

But as soon as we add that JSON chunk code, default functionalities such as Comments icon, ellipses (Context Menu) and click item to open information panel feature get overridden.

How we can apply word wrap to the Title column without loosing existing functionalities?

1
  • You cannot, you will have to recreate default functionalities/context menu using different customRowAction available in JSON formatting Jun 1, 2023 at 8:08

1 Answer 1

1

As per my understanding, currently you cannot format SharePoint default Title column without loosing existing functionalities like context menu, share and comments icon.

You will have to recreate default functionalities/context menu using different customRowAction available & supported in JSON formatting.

For example:

  • defaultClick: buttons with this action will do the same thing as clicking the list item in an uncustomized view.
  • share: Clicking the button will open the sharing dialog.
  • openContextMenu: Clicking the button will open the item's default context menu

Documentation: SharePoint JSON Formatting - customRowAction


Update from comments:

When you apply JSON column formatting, it will be shown in list view, display form and details pane (i). Currently, there are no settings available to add it only one place out of these.

To avoid showing the custom column formatting applied to Title column on display form and details pane (i), you can try below approach:

  1. Go to edit list view settings page (classic), follow: Conditional Formatting in Calendar View is not showing a Column

  2. Check checkbox against Title (linked to item) column and uncheck other Title columns (if selected)

  3. Apply JSON formatting on this newly added column & remove it from other title columns.

Make sure you are including correct Title column whose internal name is LinkTitleNoMenu and not Title or LinkTitle.

4
  • I tried and it is working fine, but the only problem is, the icons are visible on Information panel also, like I have to apply this functionality into the Title column, but I do not want the JSON formatting to be appear on Info panel of the item, is there is any way to display JSON formatting only on list view page? Jun 6, 2023 at 4:50
  • 1
    Currently, there is no setting for applying column formatting only on list view. Go to edit list view settings page (classic) > check checkbox against ** Title (linked to item)** column > uncheck other Title columns. Apply JSON formatting on this newly added column & remove it from other title columns. Make sure you are including correct Title column whose internal name is LinkTitleNoMenu and not Title or LinkTitle. Jun 6, 2023 at 5:41
  • 1
    That's what I was missing. Solved, please update your answer and add your comment into your answer, that will be helpful to viewer. You saved me one more time. Jun 6, 2023 at 6:29
  • 1
    Glad it worked for you Aakash! Updated the answer. Jun 6, 2023 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.