{"id":118,"date":"2014-04-09T11:33:35","date_gmt":"2014-04-09T10:33:35","guid":{"rendered":"http:\/\/www.riedmann.it\/blog\/?p=118"},"modified":"2014-05-06T13:05:33","modified_gmt":"2014-05-06T12:05:33","slug":"detecting-paste-operation-in-richtext-control","status":"publish","type":"post","link":"https:\/\/blog.riedmann.it\/?p=118","title":{"rendered":"Detecting paste operation in Richtext control"},"content":{"rendered":"<p>Today, I had the need to intercept the paste of text in a RTF control to remove some formattings (font type and size).<\/p>\n<p>Unfortunately the Richtext control is a special beast, and this is not possible before Windows 8.<\/p>\n<p>On Windows 8, EN_CLIPFORMAT message is sent to the owner window, but unfortunately at this moment there is no way to do this on versions before (I need Windows 7 support). More informations you can find on stackoverflow.com: <\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/5618162\/detecting-if-paste-event-occurred-inside-a-rich-text-box\" title=\"http:\/\/stackoverflow.com\/questions\/5618162\/detecting-if-paste-event-occurred-inside-a-rich-text-box\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/5618162\/detecting-if-paste-event-occurred-inside-a-rich-text-box<\/a><\/p>\n<p>My (not perfect) solution consists in a extra context menu on the control that calls my own Paste method.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I had the need to intercept the paste of text in a RTF control to remove some formattings (font type and size). Unfortunately the Richtext control is a special beast, and this is not possible before Windows 8. On Windows 8, EN_CLIPFORMAT message is sent to the owner window, but unfortunately at this moment [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-visual-objects-programming","category-vulcan-net-programming"],"_links":{"self":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":2,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":126,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions\/126"}],"wp:attachment":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}