{"id":1926,"date":"2014-10-16T21:30:27","date_gmt":"2014-10-16T19:30:27","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=1926"},"modified":"2018-12-13T14:51:45","modified_gmt":"2018-12-13T13:51:45","slug":"windows-convert-formatted-text-in-clipboard-to-plain-text","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-convert-formatted-text-in-clipboard-to-plain-text\/","title":{"rendered":"Windows: Convert formatted text in clipboard to plain text"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_1926 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_1926')){$('.twoclick_social_bookmarks_post_1926').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Convert%20formatted%20text%20in%20clipboard%20to%20plain%20text\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Awhen%20you%20often%20have%20to%20copy%20some%20text%20between%20HTML%2FBrowser%20pages%2C%20browser%20based%20content%20management%20systems%2C%20Office%20Documents%20and%20terminal%20emulators%20you%20know%20the%20problem%3A%20Text%20from%20browsers%20and%20office%20documents%20also%20contains%20format%20attributes%20like%20font%20size%2C%20fonts%20etc.%20which%20causes%20an%20unexpected%20layout%20or%20format.%0D%0A%0D%0AFor%20example%2C%20if%20you%20copy%20a%20text%20from%20LibreOffice%20to%20wordpress%28Yes%20of%20cou%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-convert-formatted-text-in-clipboard-to-plain-text\\\/\",\"post_id\":1926,\"post_title_referrer_track\":\"Windows%3A+Convert+formatted+text+in+clipboard+to+plain+text\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>when you often have to copy some text between HTML\/Browser pages, browser based content management systems, Office Documents and terminal emulators you know the problem: Text from browsers and office documents also contains format attributes like font size, fonts etc. which causes an unexpected layout or format.<\/p>\n<p>For example, if you copy a text from LibreOffice to wordpress(Yes of course, you could paste the test\u00a0 into wordpress by using the &#8220;paste plain text&#8221; toolbar buttons. But this is one step more and I prefer Ctrl V Ctrl C for copy and paste).<br \/>\n<!--more--><\/p>\n<figure id=\"attachment_1931\" aria-describedby=\"caption-attachment-1931\" style=\"width: 613px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextOffice.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1931 \" alt=\"Formatted Office text\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextOffice.png\" width=\"613\" height=\"202\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextOffice.png 875w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextOffice-300x99.png 300w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/a><figcaption id=\"caption-attachment-1931\" class=\"wp-caption-text\">Formatted Office text<\/figcaption><\/figure>\n<figure id=\"attachment_1932\" aria-describedby=\"caption-attachment-1932\" style=\"width: 545px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextWordpress.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1932 \" alt=\"Formatted Office text in wordpress\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextWordpress.png\" width=\"545\" height=\"204\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextWordpress.png 778w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextWordpress-300x112.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/a><figcaption id=\"caption-attachment-1932\" class=\"wp-caption-text\">Formatted Office text in wordpress<\/figcaption><\/figure>\n<p>I wrote a small tool which eliminates all formats from text in the clipboard. What the tool does.<\/p>\n<ul>\n<li>It resides in systray respective notification area\n<p><figure id=\"attachment_1935\" aria-describedby=\"caption-attachment-1935\" style=\"width: 190px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatText.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1935\" alt=\"Tool in Notification area\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatText.png\" width=\"190\" height=\"120\" \/><\/a><figcaption id=\"caption-attachment-1935\" class=\"wp-caption-text\">Tool in Notification area<\/figcaption><\/figure><\/li>\n<li>It registers a global Hotfix, default Ctrl-S, when pressed, the text in clipboard is &#8220;unformatted&#8221;<\/li>\n<li>It has an <strong>automatic mode<\/strong>. If a text is copied to the clipboard, the text is immediately &#8220;unformatted&#8221; and copied back to clipboard.<\/li>\n<li>When\u00a0 a text is unformatted, it displays a Ballontip with the text\u00a0 for a few seconds.\n<p><figure id=\"attachment_1936\" aria-describedby=\"caption-attachment-1936\" style=\"width: 285px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextBallonTip.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1936\" alt=\"Tool in Notification area\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2014\/05\/unformatTextBallonTip.png\" width=\"285\" height=\"126\" \/><\/a><figcaption id=\"caption-attachment-1936\" class=\"wp-caption-text\">Tool in Notification area<\/figcaption><\/figure><\/li>\n<li>It converts Office double quotes<em> \u201eYour Text\u201c<\/em> to double quotes used in command lines <em>&#8220;Your Text&#8221;<\/em> (<strong>replace mode<\/strong>) <a href=\"https:\/\/lookup-phone-prefix.com\">https:\/\/lookup-phone-prefix.com<\/a> , also the minus character is converted.<\/li>\n<\/ul>\n<p>The tool is written in C#. Binaries (Folder \\bin\\Release\\unformatClipboardText.exe) and Visual Studio 2013 project files are attached in the zip package below. Modify it for your own needs!<\/p>\n<p>Update: V1.1 has also the ability to convert all text to upper- and lowercase.<\/p>\n<p>Update: V1.2 If a valid MAC Address is found in Clipboard, unformatClipboardText can convert it to one of the following formats<\/p>\n<ul>\n<li>0123456789AB<\/li>\n<li>01:23:45:67:89:AB<\/li>\n<li>01-23-45-67-89-AB<\/li>\n<li>0123.4567.89AB<\/li>\n<\/ul>\n<p>this version also can remove leading and trailing spaces.<br \/>\nUpdate: V1.2.2 Its possible to switch off the  Global hotkey<br \/>\nUpdate: V1.2.3.1 Its possible to disable the balloon tip on unformat<br \/>\nUpdate: V1.2.3.4 More stable<br \/>\nUpdate: v1.3.0.0 All clipboard activities can logged to a file<br \/>\nUpdate: V1.4.0.0 Only one program instance can start<br \/>\nUpdate: V1.4.4.0 Logfile can viewed within the program. Bugfixes<br \/>\nUpdate: V1.4.4.3 Logfileformat changed from UTF BOM to UTF. Logview Autoscroll can be disabled<br \/>\nUpdate: V1.4.4.5 Fixes the null pointer exception which sometimes occures<\/p>\n<p>Michael<\/p>\n<p>Credits and honor\u00a0 to <a title=\"Register a global hotkey with C#\" href=\"http:\/\/www.liensberger.it\/web\/blog\/?p=207\">Christian Liensberger<\/a> and <a title=\"Clipboard change event in C#\" href=\"http:\/\/www.fluxbytes.com\/csharp\/how-to-monitor-for-clipboard-changes-using-addclipboardformatlistener\/\">CooLMinE<\/a> for technics to register a global hotkey and a clipboard change detect in C#.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, when you often have to copy some text between HTML\/Browser pages, browser based content management systems, Office Documents and terminal emulators you know the problem: Text from browsers and office documents also contains format attributes like font size, fonts etc. which causes an unexpected layout or format. For example, if you copy a text &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/windows-convert-formatted-text-in-clipboard-to-plain-text\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Windows: Convert formatted text in clipboard to plain text<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,2],"tags":[550,477,450,478,549,479,481,480,20],"class_list":["post-1926","post","type-post","status-publish","format-standard","hentry","category-c","category-windows","tag-cisco","tag-clipboard","tag-convert","tag-format-attributes-text","tag-mac-address","tag-plain-text","tag-remove-format","tag-unformat","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=1926"}],"version-history":[{"count":24,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1926\/revisions"}],"predecessor-version":[{"id":6138,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1926\/revisions\/6138"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=1926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=1926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=1926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}