NPP_ExportPlugin icon indicating copy to clipboard operation
NPP_ExportPlugin copied to clipboard

Export formatted text as default style

Open igitur opened this issue 6 years ago • 4 comments

Hi,

I use Notepad++ with a dark theme, e.g. Obsidian. However, I would like to export the formatted text a light theme, e.g. the default Notepad++ theme, because I often need to paste it into an email and send it someone else. The dark mode background is quite disrupting in the middle of an email with a white background.

Would adding the option to export using default style be possible?

Thanks

igitur avatar Jan 09 '20 14:01 igitur

Which export option do you use? HTML?

Probably that would be possible, if in https://github.com/chcg/NPP_ExportPlugin/blob/master/src/HTMLExporter.cpp#L114-L115

currentStyle would be set to defaultStyle.

chcg avatar Jan 13 '20 08:01 chcg

I mainly use Copy HTML to clipboard, but even with Copy RTF to clipboard does it copy using the current style.

igitur avatar Jan 13 '20 09:01 igitur

@igitur What would be your expectation for this case. Should just the background colour be white or transparent or the one from the default style. And how should the foreground colours behave? From a first check of the code it might be possible to modify the background, but the foreground seems to be quite hard to modify as the styling is taken from the underlying scintilla and the theme is unknown there and also not accessible by plugins.

chcg avatar Dec 07 '20 15:12 chcg

I can imagine that this is tricky to implement but I do share the same frustration as @igitur: how great it would be to enjoy Notepadd++' dark mode and at the same time still have "Copy RTF to clipboard" (or HTML) use the default style. Working only on the background won't do the trick, as foreground colors would become unreadable.

I use the copy functionality so often that my only solution for now is to ignore the cries of my eyes begging for the dark mode :P

laurent149 avatar Aug 18 '22 17:08 laurent149