Look the image above, the tooltip shows a preview of contents in the text/plain file in a white background, the content-text color is also white; therefore it is useless. I am using a dark theme and dark themes should use white for normal text. This problem is not happening in light themes. How to fix this issue ?
Which exact theme and Plasma version are you using? I currently use Breeze Dark on Plasma 5.17.5, no problem with the tooltips here.
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11 FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
From your screenshot I guess it shows a blank sheet for a text file then? In that case I guess that's how it should be
FWIW: taking screenshots with spectacle can be done on a defined portion of the screen, no need to do a full screen snapshot
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11 FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
In your screenshot, the file size is just 1 byte, so practically empty, which would be why nothing appears in the screenshot. Can you try editing the text file, adding some more text, save and then try the preview again? I would expect that if there were any text in the document that it should show up in black-on-white, just like the other formats you mentioned (which are all just different flavors of text file and ultimately should be using the same preview style).
airdrik, proud to be a member of KDE forums since 2008-Dec.