
To save the code with all the formatting preserved to an external file, choose Export to RTF or HTML. Within NppExport menu, you’ll also find other exporting and copying options. Now when you paste the code into a program that supports rich text formatting, for example Microsoft Word or Evernote, all of the formatting should be retained. When you have it ready, highlight the code that you want to copy, then go to Plugins (on the menu bar) > Select NppExport > Copy all formats to clipboard. 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. Copy the HTML back into the Wiki HTML editor.Notepad++ is the one of the most, if not the most, popular text editor for Windows. To quickly find and replace text using Notepad++, highlight the text to be replaced, and use the Ctrl+H keyboard combination to open the Find and Replace dialog boxĩ. Update the styles used on the code block. Finally, to ensure the font sizes are consistent on all browsers, switch to the HTML viewĨ. Copy the formatted XML into the Wiki code editorĥ. Click Plugins > XML Tools >Pretty Print (XML Only - with line breaks).Ĥ. Once the XML has been linarized, it can now be formatted with line breaks and tabs. This will remove all of the line breaks and extra spacing from the code.ģ.

Click on Plugins > XML Tools > Linarize XML. To format this code so that it's readable, and has a consistent font size, follow these steps.Ģ. The code editor does a reasonable job of colourizing the markup, but it's hard to read (and on some browsers, the font will be smaller).
