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

Can inline styles be supported?

Open liuyib opened this issue 3 years ago • 1 comments
trafficstars

Firstly, react-diff-viewer inserts the <style> tag to render CSS styles, but in some cases (such as Micro-Frontends, I'm using qiankun framework), the code styles will be lost:

image

So I think above problem can be solved by inline CSS styles, or put the styles to .css file. This is a valid guess, for example, react-codemirror2 with similar functions is put CSS styles to .css files, and its style is normal.

image

Totally, I hope react-diff-viewer can support multiple way to render CSS styles, instead of only <style> tag.

liuyib avatar Jun 02 '22 03:06 liuyib

I have encountered the same problem. I have a little solution in my issue

https://github.com/praneshr/react-diff-viewer/issues/181

VladyslavKvaskov avatar Mar 10 '23 16:03 VladyslavKvaskov