How to get the txtContent from an Multiple line text field - Enhanced rich text?
Important
I want to show one column Multiple line of text in the list formatting. Right now is showing the HTML and not the rich text.
Category
- [X] Question
- [ ] Bug
- [ ] Enhancement
Observed Behavior

Steps to Reproduce
Column config.

JSON { "elmType": "div", "style": { "flex-grow": "1" }, "children": [ { "elmType": "span", "style": { "display": "block" }, "attributes": { "class": "ms-fontWeight-semibold ms-fontSize-m" }, "txtContent": "Answer:" }, { "elmType": "span", "style": { "display": "=if([$Answer] == '', 'none', 'block')", "padding-left": "8px" }, "txtContent": "=toString([$Answer])", "attributes": { "class": "ms-fontSize-s ms-fontWeight-regular ms-fontColor-neutralSecondary" } }, { "elmType": "span", "style": { "display": "=if([$Answer] == '', 'block', 'none')", "padding-left": "8px" }, "txtContent": "No answer entered", "attributes": { "class": "ms-fontSize-s ms-fontWeight-semilight ms-fontColor-neutralTertiary" } } ] }
I'm struggling with the same issue. Can't seem to find out how to strip out the HTML and just show the formatted text.
Any luck?
Unfortunately, there is no way to do this currently. The value of enhanced/rich multiline text fields are returned from SharePoint as strings (not as HTML elements). The string values include all the HTML with the text content embedded within. There are no alternative values that just contain the text.
There is no support for accessing a DOMParser to turn this from a string into HTML elements within column formatting. Even then, you would need to traverse the result and retrieve the text values (strip out the HTML) by using operations that are not available within column formatting.
This has far more to do with how SharePoint stores and returns values for these types of fields than any real limitation with column formatting. For this kind of advanced processing, a SharePoint Framework Field Customizer would be the right solution.
Say it ain't so, @thechriskent! I was sure you'd have some magic dust to sprinkle on this one.
Hope we get something for this
Can we please reopen this ticket?
This is a question regarding out of the box list formatting. This issues list is for issues pertaining to the samples in this repository.
If you would like Microsoft to implement something to address this limitation please create a suggestion on SharePoint Development User Voice. Reopening this issue will have no impact on how things work. Thanks!
This suggestion seems related and has almost 150 votes: https://feedbackportal.microsoft.com/feedback/idea/fff8f364-de1c-ec11-b6e7-0022481f8914
@tomresing if you don't mind, replicate this request in feedback for Microsoft Lists. https://feedbackportal.microsoft.com/feedback/idea/445d79c1-6906-ed11-a81b-6045bd864d4f
Do we have solution or workaround for this issue?
no workaround yet.
My case was trying to re-use the Description field in a Document Library (for videos). The Description field for the built-in video viewer actually uses an internal field called _ExtendedDescription.
I found that you can edit the Description field records (_ExtendedDescription) via Edit in grid view where this doesn't apply DOM elements or styling (wahoo). An alternative is PowerApps form. Doing it one of these ways display well in formatted views and the native video viewer. IE "txtContent": "[$_ExtendedDescription]": no DOM elements or formatting issue.
This suggestion seems related and has almost 150 votes: https://feedbackportal.microsoft.com/feedback/idea/fff8f364-de1c-ec11-b6e7-0022481f8914
Has this issue been deleted? Both this and the Lists one 404 for me.
@gormster I can't reach either, though I think the Lists link was meant to link to the Lists area of the portal.
Any progress on this? I would like to use the JSON to keep the rich text editor from putting everything in Calibri 11 instead of Segoe UI 11... Another "annoyance" from Sharepoint Lists...
This is still an issue? Any workarounds on rendering HTML in listview or SPFX web parts?