
If you don’t have NppExport installed, you can download it through the inbuilt plugin manager. Latest builds of Notepad++ ships with this plugin. Although, there is a way to retain this formatting, i.e. The syntax highlighting you see is just a visual enhancement. This shouldn’t be surprising as the program is basically a plain-text editor. However, when you save the file or copy text from it to an external program, all of the syntax highlighting and formatting is lost, and the text will take on formatting of the program you’re pasting into. When you open a supported file format in Notepad++, it performs syntax highlighting where it formats the text with various colors to make reading easier.

If you are using it as your default text editor, here’s a little tip for copying codes with syntax highlighting from the program to any external program. It’s fast, powerful, and comes with support for dozens of different file types. Notepad++ is the one of the most, if not the most, popular text editor for Windows.
