react-diff-viewer icon indicating copy to clipboard operation
react-diff-viewer copied to clipboard

Text not visible for too long content

Open arshad-turtle opened this issue 2 years ago • 6 comments
trafficstars

I am uploading a zip file and wants to show unzip file text content in the front end the file unzipping api is working fine,And react diff viewer is working fine for normal files,but assoon as i upload large file which content big texts its only returning a title name on both side Screenshot 2023-02-27 at 3 03 20 PM

arshad-turtle avatar Feb 27 '23 09:02 arshad-turtle

I'm facing a similar issue.

The scroll cuts some information, which only happens with ReactDiffViewer.

image

ruiaraujo012 avatar Mar 21 '23 11:03 ruiaraujo012

@ruiaraujo012 did you end up fixing this issue? Would love to know how!

DaanvanHulsen avatar Jun 06 '23 15:06 DaanvanHulsen

@DaanvanHulsen Unfortunately, I didn't

ruiaraujo012 avatar Jun 06 '23 15:06 ruiaraujo012

@ruiaraujo012 Got it! Add this code to your style:

line: { wordBreak: 'break-word', },

DaanvanHulsen avatar Jun 06 '23 16:06 DaanvanHulsen

Thank you. I really appreciate it

ruiaraujo012 avatar Jun 06 '23 17:06 ruiaraujo012

guess this is worth integrating by default?

side note can be worth mentionning line: { wordBreak: 'break-word', height: 'auto' }, can be needed too (plus min-height in some cases) like in split view otherwise it stays unreadable.

rmannibucau avatar Dec 05 '23 18:12 rmannibucau