Question

In SharePoint Online modern page I am trying to remove the styling that causes a white overlay and hides most of the text using the following JSON column formatting, so that the column height will be adjusted to display the full text of the column.

When previewing the changes with the following JSON formatting the full text is displayed and the background is removed but the text is not displayed with the applied formatting and all the HTML tags are displayed as if the text area's HTML has been encoded.

Is there any way to format SharePoint column with JSON and retain the formatted display of the text?

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "@currentField",
       "style": {
        "background": "none",
        "display":"initial",
        "overflow": "visible"
    }
}
Was it helpful?

Solution

Currently, rich multiline text fields are not supported within json column formatting. You could read this article: https://github.com/SharePoint/sp-dev-list-formatting/issues/88

The only workaround is using "plain text" instead in column settings.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top