function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ScottB3ScottB3 

Is there any way to get rich text into a lightning datatable

I am working with Lightning Web Components and have implemented the use of lightning-datatables in many places in the app which I am developing.
The requirements have just changed and I now need to change some of my fields to rich text.  As far as I can figure out, there is no way to do this.
I see in the documentation that there is the idea of Creating Custom Data Types, but can't figure it out.

Does anyone know how I can incorporate a rich text field in a lightning-datatable?  
 
jprichterjprichter
Here's a StackExchange (https://salesforce.stackexchange.com/questions/274594/need-help-with-custom-types-in-lightning-datatable-lwc) with a link to a working prototype (https://developer.salesforce.com/docs/component-library/tools/playground/l_0ieW-Sm/32/edit)using popover. You'd want to use lightning-input-rich-text instead of popover, but the concept is the same.
ScottB3ScottB3
Thank you.  I have this working now, but it's presented me with a new problem.
The text clipping "feature" in the datatables no longer gives me the option to manually wrap the text.

How can I get the wrap text feature back (or, preferably, disable it from hiding the overflow in the first place)?
Benjamin J. LuehrsBenjamin J. Luehrs
Use a Custom Data Type outlined in the lightning-datatable documentation and implemented here https://unofficialsf.com/now-display-rich-text-and-custom-links-and-images-in-datatables/