diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index 1f340a03..314b505d 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -28,6 +28,7 @@
+
diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml
index b1612142..93af8c63 100644
--- a/PowerEditor/installer/nativeLang/french.xml
+++ b/PowerEditor/installer/nativeLang/french.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc
index 33c6b659..19f03d9a 100644
--- a/PowerEditor/src/Notepad_plus.rc
+++ b/PowerEditor/src/Notepad_plus.rc
@@ -255,14 +255,19 @@ BEGIN
POPUP "Blank Operations"
BEGIN
MENUITEM "Trim Trailing Space", IDM_EDIT_TRIMTRAILING
- MENUITEM "Trim Leading Space", IDM_EDIT_TRIMLINEHEAD
- MENUITEM "Trim Leading and Trailing Space", IDM_EDIT_TRIM_BOTH
+ MENUITEM "Trim Leading Space", IDM_EDIT_TRIMLINEHEAD
+ MENUITEM "Trim Leading and Trailing Space", IDM_EDIT_TRIM_BOTH
MENUITEM "EOL to Space", IDM_EDIT_EOL2WS
MENUITEM "Remove Unnecessary Blank and EOL", IDM_EDIT_TRIMALL
MENUITEM SEPARATOR
MENUITEM "TAB to Space", IDM_EDIT_TAB2SW
MENUITEM "Space to TAB", IDM_EDIT_SW2TAB
END
+ POPUP "Paste Special"
+ BEGIN
+ MENUITEM "Paste HTML Content", IDM_EDIT_PASTE_AS_HTML
+ MENUITEM "Paste RTF Content", IDM_EDIT_PASTE_AS_RTF
+ END
MENUITEM SEPARATOR
MENUITEM "Column Mode...", IDM_EDIT_COLUMNMODETIP
MENUITEM "Column Editor...", IDM_EDIT_COLUMNMODE
diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp
index 751c1773..143b5b7e 100644
--- a/PowerEditor/src/NppCommands.cpp
+++ b/PowerEditor/src/NppCommands.cpp
@@ -21,6 +21,10 @@
#include "ShortcutMapper.h"
#include "TaskListDlg.h"
+#define CF_HTML TEXT("HTML Format")
+#define CF_RTF TEXT("Rich Text Format")
+
+
void Notepad_plus::macroPlayback(Macro macro)
{
_pEditView->execute(SCI_BEGINUNDOACTION);
@@ -142,6 +146,35 @@ void Notepad_plus::command(int id)
}
break;
+ case IDM_EDIT_PASTE_AS_RTF:
+ case IDM_EDIT_PASTE_AS_HTML:
+ {
+ UINT f = RegisterClipboardFormat(id==IDM_EDIT_PASTE_AS_HTML?CF_HTML:CF_RTF);
+
+ if (!IsClipboardFormatAvailable(f))
+ return;
+
+ if (!OpenClipboard(NULL))
+ return;
+
+ HGLOBAL hglb = GetClipboardData(f);
+ if (hglb != NULL)
+ {
+ LPSTR lptstr = (LPSTR)GlobalLock(hglb);
+ if (lptstr != NULL)
+ {
+ // Call the application-defined ReplaceSelection
+ // function to insert the text and repaint the
+ // window.
+ _pEditView->execute(SCI_REPLACESEL, 0, (LPARAM)lptstr);
+
+ GlobalUnlock(hglb);
+ }
+ }
+ CloseClipboard();
+ }
+ break;
+
case IDM_EDIT_DELETE:
_pEditView->execute(WM_CLEAR);
break;
diff --git a/PowerEditor/src/localizationString.h b/PowerEditor/src/localizationString.h
index 8d187bc0..a2c6c59d 100644
Binary files a/PowerEditor/src/localizationString.h and b/PowerEditor/src/localizationString.h differ
diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h
index 90474d04..cfa3b715 100644
--- a/PowerEditor/src/menuCmdID.h
+++ b/PowerEditor/src/menuCmdID.h
@@ -99,6 +99,9 @@
#define IDM_EDIT_BLOCK_COMMENT_SET (IDM_EDIT + 35)
#define IDM_EDIT_BLOCK_UNCOMMENT (IDM_EDIT + 36)
#define IDM_EDIT_COLUMNMODETIP (IDM_EDIT + 37)
+ #define IDM_EDIT_PASTE_AS_HTML (IDM_EDIT + 38)
+ #define IDM_EDIT_PASTE_AS_RTF (IDM_EDIT + 39)
+
#define IDM_EDIT_AUTOCOMPLETE (50000 + 0)
#define IDM_EDIT_AUTOCOMPLETE_CURRENTFILE (50000 + 1)