Notepad++ copy with formatting
The text formatting in Notepad++ can be copied to clipboard or exported using the menu Plugins > NppExport > Export to RTF or Export to HTML.
Once exported, the formatted text with its syntax highlighting can be pasted in other applications, such as LibreOffice, Microsoft Word, or a WordPress post.
Several options are offered to export the data with the text decoration:
- Export to RTF, to open with a text Editor such as LibreOffice or Word,
- Export to HTML, top open with a web browser such as Mozilla Firefox or Google Chrome,
- Copy RTF to clipboard, which will allow to paste the text with decoration directly in a LibreOffice or Word document,
- Copy HTML to clipboard, which will copy the text but lose the decoration,
- Copy all formats to clipboard, which will copy everything to the clipboard.Download Firefox
Download Notepad++ free source code editor with syntax highlighting
Download Google Chrome
Download Libre Office
Microsoft Office download center
Notepad++ copy all formats to clipboard access violation
When using the export functions, the exception error Access violation from the runPluginCommand might happen.
In such case, use the export to files instead of the copy to clipboard, in order to get to the result fast.
To solve it, restart Notepad++, restart the computer, or update Notepad++ with the latest version if previous solutions are not working.
Firefox copy source with format
It is not possible to copy a source file from Firefox with the text formatting, or at least not without using specific plugins or applications.
However, it is possible to get the HTML source code with it's formatting by pasting the text in Notepad++, selecting menu Language > H > HTML, and using that solution to paste the text in another editor.
Libre Office paste HTML
If it is not always possible to paste HTML with the text formatting, another solution is to use the export to RTF option of Notepad++.
Once the export file has been saved on the computer, it can be opened in LibreOffice, and the text decoration will appear just as it was in Notepad++.
Wordpress paste HTML
To paste some HTML formatted text in WordPress, and visualize the text decoration just as it was in Notepad++ for example, the best way is to export the file to RTF, open it in LibreOffice or Microsoft Word, and, from there, copy and paste to WordPress visual editor.
That way, the code should have been pasted with its syntax highlighting.
If text is pasted in the text editor mode, then it will not likely not be displayed properly, or even not at all, as the visual editor will process the HTML code instead of displaying it.
Notepad++ copy with syntax highlighting
In order to copy text with syntax highlighting in Notepad++, it is necessary to use an external plugin such as NPPExport.
The plugin can be installed with plugin manager, which can be access in menu plugins > plugin manager > available plugins tab > NPPExport > install.
Once the plugin has been installed, restart Notepad++ in order to see the plugin NPPExport appear in plugins menu.
Then, simply select the option plugins > NPPExport > copy all formats to clipboard, in order to copy text with syntax highlighting from Notepad++ to paste in Word editor or other text editor.