Various

Notepad++ copy with formatting

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 with formatting : Notepad++ copy with formatting
Notepad++ copy with formatting

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.

Notepad++ copy with formatting : Notepad++ copy all formats to clipboard access violation
Notepad++ copy all formats to clipboard access violation

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.

Notepad++ copy with formatting : Firefox copy source with format
Firefox copy source with format

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++.

Notepad++ copy with formatting : Libre Office paste HTML
Libre Office paste HTML

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.

Notepad++ copy with formatting : WordPress paste HTML visual with highlight
WordPress paste HTML visual with highlight

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 formatting : WordPress paste HTML code
WordPress paste HTML code