0

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"
    }
}
0

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.

  • I kind of figured this was the case because I had tried to use various DOMParsers and implement custom functions but SharePoint blocked the usage of all of them. Unfortunately a requirement for this is that the text must be formatted because it contains critical links and details in the HTML formatting. Looks like building a SPFx extension to control the SharePoint modern page is the only way to go. Thanks for confirming – gemini6609 Jan 10 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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