<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matt Refghi&#039;s Blog &#187; paste</title>
	<atom:link href="http://mattrefghi.com/blog/tag/paste/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrefghi.com/blog</link>
	<description>Computer Science and other written works</description>
	<lastBuildDate>Sat, 10 Mar 2012 17:58:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Pasting Text Without Formatting In Google Chrome</title>
		<link>http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/</link>
		<comments>http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/#comments</comments>
		<pubDate>Sun, 08 May 2011 23:58:08 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[google docs]]></category>
		<category><![CDATA[paste]]></category>

		<guid isPermaLink="false">http://mattrefghi.com/wordpress/?p=3022</guid>
		<description><![CDATA[As part of my regular]]></description>
			<content:encoded><![CDATA[<p>As part of my regular use of Gmail, I often find myself pasting text from web into my e-mails. Since the Gmail editor supports rich-text, pasting generally includes the formating, which, most of the time, simply does not make sense within the e-mail. For years, I have been using a trick to get around this - <a href="http://mattrefghi.com/wordpress/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/" target="_blank">one which involved using the almighty Windows Notepad</a>. By simply pasting the text into Notepad, and then copying it from there, I make sure the formating is not brought over. This works because Notepad itself does not support formating. As useful as this trick is, I often found myself wondering whether there were better options available.</p>
<p>A few days ago, as I was writing an e-mail to a prospective client, I made the mistake of writing it in Google Docs, and then copying it over to Gmail. With the Notepad trick applied, I would have been fine &#8211; but it slipped my mind in this occasion. Copying text from Google Docs had one immediate effect &#8211; it meant the Google Docs font would be used in the Gmail Editor. In itself, not a problem &#8211; but as I continued working on the e-mail, I found myself copying another specific subset of the Google Doc, and pasting it in the middle of the e-mail. All looked fine within the editor, but after it was sent, one flaw was made immediately apparent:</p>
<p style="text-align: center;"><img class="size-full wp-image-3024  aligncenter" src="http://mattrefghi.com/wordpress/wp-content/uploads/2011/05/GmailWasteOfSpace.png" alt="An extra line break appears immediately following the text I pasted from Google Docs" width="489" height="391" /></p>
<p>Notice the unnecessary extra spacing? It appeared immediately after the content I pasted from Google Docs. To make matters worse, part of my e-mail explained how I put emphasis on perfecting the content I produce. Words cannot express how infuriating it is for a perfectionist to express his perfectionism, only to realize he sent an obviously imperfect e-mail.</p>
<p>I immediately sought to find a solution, once and for all, to ensure I never make such a mistake again. After some searching, I discovered that the good folks at Google already took steps to fix this browser &#8220;feature&#8221;. While using Google Chrome, one can simply press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>V</kbd> to paste without formating. Since Google Chrome is my browser of choice, this covers 90% of my use cases, making it a solid solution. Hopefully other browsers will start implementing similar features, permanently resolving the issue.</p>
<p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2011%2F05%2Fpasting-text-without-formatting-in-google-chrome%2F&amp;linkname=Pasting%20Text%20Without%20Formatting%20In%20Google%20Chrome" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2011%2F05%2Fpasting-text-without-formatting-in-google-chrome%2F&amp;linkname=Pasting%20Text%20Without%20Formatting%20In%20Google%20Chrome" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2011%2F05%2Fpasting-text-without-formatting-in-google-chrome%2F&amp;linkname=Pasting%20Text%20Without%20Formatting%20In%20Google%20Chrome" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2011%2F05%2Fpasting-text-without-formatting-in-google-chrome%2F&amp;linkname=Pasting%20Text%20Without%20Formatting%20In%20Google%20Chrome" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="horizontal" data-url="http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/" data-text="Pasting Text Without Formatting In Google Chrome"></a><a class="a2a_button_google_plusone addtoany_special_service" data-href="http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2011%2F05%2Fpasting-text-without-formatting-in-google-chrome%2F&amp;title=Pasting%20Text%20Without%20Formatting%20In%20Google%20Chrome" id="wpa2a_2"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2011/05/pasting-text-without-formatting-in-google-chrome/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Copying the Contents of Windows Dialogs</title>
		<link>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/</link>
		<comments>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:49:39 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[paste]]></category>

		<guid isPermaLink="false">http://www.mattrefghi.com/wordpress/?p=1143</guid>
		<description><![CDATA[As a developer, I very]]></description>
			<content:encoded><![CDATA[<p>As a developer, I very often see error messages &#8211; some of those originate from the products I develop, and I have to report them as bugs. Whenever I get an error message in a dialog, I typically take a screenshot, and add that to the bug base issue. That&#8217;s fine, but it means people can&#8217;t search for that error message in the bug base &#8211; in order to enable that, I&#8217;d usually just manually type out the error message, rather than take a screenshot. That was before. <strong>Today, I&#8217;d</strong><strong> just press </strong><kbd><strong>CTRL</strong></kbd><strong>+</strong><kbd><strong>C</strong></kbd><strong> to copy the error dialog contents</strong>.</p>
<p>That&#8217;s right, whenever you see a dialog in Windows, like this:</p>
<div id="attachment_1147" class="wp-caption aligncenter" style="width: 482px"><a href="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialog.png" rel="lightbox[1143]"><img class="size-full wp-image-1147 " title="A typical Windows error message dialog." src="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialog.png" alt="" width="472" height="127" /></a><p class="wp-caption-text">A typical Windows error message dialog.</p></div>
<p style="text-align: left;">You can press <kbd>CTRL</kbd>+<kbd>C</kbd> to copy, and then open up Notepad, and press <kbd>CTRL</kbd>+<span style="font-family: monospace;">V</span> to paste:</p>
<div id="attachment_1148" class="wp-caption aligncenter" style="width: 519px"><img class="size-full wp-image-1148 " title="The dialog title, contents, and even the button text are saved to the clipboard." src="http://www.mattrefghi.com/wordpress/wp-content/uploads/2010/01/ErrorDialogCopied.png" alt="" width="509" height="205" /><p class="wp-caption-text">The dialog title, contents, and even the button text are saved to the clipboard.</p></div>
<p style="text-align: center;">
<p><strong> </strong></p>
<p>I had <em>no idea </em>this was possible until I read <a href="http://lifehacker.com/268547/copy-error-messages-text-to-the-clipboard" target="_blank">a Lifehacker article</a> explaining it.  Since I&#8217;ve started using it, I&#8217;ve found it very useful in my every day work. Maybe you will too!</p>
<p>Just a note, though &#8211; it doesn&#8217;t seem to work <em>everywhere</em>. For example, JavaScript alert dialogs can&#8217;t be copied in Firefox, but they can in Internet Explorer.</p>
<p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;linkname=Copying%20the%20Contents%20of%20Windows%20Dialogs" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="horizontal" data-url="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/" data-text="Copying the Contents of Windows Dialogs"></a><a class="a2a_button_google_plusone addtoany_special_service" data-href="http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2010%2F01%2Fcopying-the-contents-of-windows-dialogs%2F&amp;title=Copying%20the%20Contents%20of%20Windows%20Dialogs" id="wpa2a_4"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2010/01/copying-the-contents-of-windows-dialogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Formatted Text from the Clipboard to Plain Text</title>
		<link>http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/</link>
		<comments>http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 15:54:52 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.mattrefghi.com/wordpress/?p=711</guid>
		<description><![CDATA[Usually when I copy text]]></description>
			<content:encoded><![CDATA[<p>Usually when I copy text from web pages, I really don&#8217;t want the formatting from the webpage to be kept. I  just want to have the text in the simplest format possible, and then I can set my own styles. Unfortunately, this isn&#8217;t normally how it works. Typically, when copying from a web page in a browser, it may also copy any tables, images, and styles that are <em>applied to</em> or <em>mixed with</em> the text. This does depend on where you are pasting the text, though. In my case, I use Microsoft Word most of the time. Word supports a lot of web page elements, meaning they will likely appear in the Word document.</p>
<p>Consider the following text:</p>
<blockquote><p>This is some <strong>example </strong><em>text</em>. You&#8217;ll notice that <span style="text-decoration: line-through">numerous </span>styles are <span style="text-decoration: underline">applied</span>. <img class="alignnone size-full wp-image-13" src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/01/warning.png" alt="warning" width="16" height="16" /></p>
<p>Here are some bullet points:</p>
<ul>
<li>One</li>
<li>Two</li>
<li><strong>Three</strong>
<ul>
<li>Three <em>Part 1</em></li>
<li>Three <em>Part 2</em></li>
</ul>
</li>
<li>Four</li>
</ul>
</blockquote>
<p>If I wanted to copy that text to Microsoft Word, here is what I&#8217;d see:</p>
<div id="attachment_722" class="wp-caption aligncenter" style="width: 475px"><img class="size-full wp-image-722 " src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/08/pastedtoword.png" alt="pastedtoword" width="465" height="204" /><p class="wp-caption-text">Word is pretty good at keeping the formatting mostly intact; however, sometimes, this isn&#39;t desired.</p></div>
<p>The formatting is mostly intact. What if you didn&#8217;t want that? What if you just wanted plain text, and you wanted to choose your own styles from scratch? There is one way to do it from within Word (click the <img class="alignnone size-full wp-image-724" src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/08/wordbutton1.png" alt="wordbutton1" width="20" height="20" /> button for these options), but I&#8217;ll show you how to do it <em>without </em>such a  feature. To achieve this, <strong>I paste the text into Notepad</strong>. Yes, <a href="http://en.wikipedia.org/wiki/Notepad_(Windows)" target="_blank">Notepad &#8211; the simple text editor provided by Windows</a>. Here&#8217;s what the text will look like, once pasted:</p>
<p style="text-align: center"><a href="http://mattrefghi.com/wordpress/wp-content/uploads/2009/08/notepadremovesformatting.png" target="_blank" rel="lightbox[711]"><img class="aligncenter size-full wp-image-715" src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/08/notepadremovesformatting.png" alt="Notepad will remove formatting from any text you paste into it." width="479" height="222" /></a></p>
<p>Notice how the image is gone, and all the styles are removed? <strong>Now you can copy t</strong><strong>his text instead</strong>, and paste it in Word:</p>
<div id="attachment_721" class="wp-caption aligncenter" style="width: 425px"><img class="size-full wp-image-721 " src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/08/pastedtowordplaintext.png" alt="pastedtowordplaintext" width="415" height="177" /><p class="wp-caption-text">No more formatting!</p></div>
<p style="text-align: left">No more styles, bullets, or image. You can now style it exactly as you want, <em>without </em>having to start off with the same formatting as the web page. This isn&#8217;t, perfect, though &#8211; you may have to make corrections to the plain text copy in Notepad, as the removal of the formatting sometimes leaves the text with improper indentation.</p>
<p style="text-align: left">I&#8217;ve used this little trick in a few different scenarios. Here&#8217;s an example: Sometimes I include a quote from a website in my e-mails. The default format for my e-mails is rich text, but when I include something from another source, I really don&#8217;t care about formatting &#8211; I&#8217;ll set my own formatting to suit my e-mail. If I just copy paste the quote into my e-mail, it will include the formatting &#8211; this usually ruins the look of my e-mail. To prevent this, what I do first is use Notepad to destroy the formatting, and then paste the plain-text version into my e-mail.</p>
<p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F08%2Fconverting-formatted-text-from-the-clipboard-to-plain-text%2F&amp;linkname=Converting%20Formatted%20Text%20from%20the%20Clipboard%20to%20Plain%20Text" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F08%2Fconverting-formatted-text-from-the-clipboard-to-plain-text%2F&amp;linkname=Converting%20Formatted%20Text%20from%20the%20Clipboard%20to%20Plain%20Text" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F08%2Fconverting-formatted-text-from-the-clipboard-to-plain-text%2F&amp;linkname=Converting%20Formatted%20Text%20from%20the%20Clipboard%20to%20Plain%20Text" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F08%2Fconverting-formatted-text-from-the-clipboard-to-plain-text%2F&amp;linkname=Converting%20Formatted%20Text%20from%20the%20Clipboard%20to%20Plain%20Text" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="horizontal" data-url="http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/" data-text="Converting Formatted Text from the Clipboard to Plain Text"></a><a class="a2a_button_google_plusone addtoany_special_service" data-href="http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F08%2Fconverting-formatted-text-from-the-clipboard-to-plain-text%2F&amp;title=Converting%20Formatted%20Text%20from%20the%20Clipboard%20to%20Plain%20Text" id="wpa2a_6"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2009/08/converting-formatted-text-from-the-clipboard-to-plain-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

