0

I want to copy some text from a webpage or a document and paste it somewhere else after stripping all formatting and whitespace.*** Currently, I do this by:

  1. Copy the required text
  2. Paste the text in an URL bar of a browser.
  3. Copy the text from the URL
  4. Paste at the required area

This strips of all new line characters or carriage returns and works perfectly. However, I need a faster way of doing thihs.

***PureText does not help. From their site:

PureText only removes rich formatting from text. This includes the font face, font style (bold, italics, etc.), font color, paragraph styles (left/right/center aligned), margins, character spacing, bullets, subscript, superscript, tables, charts, pictures, embedded objects, etc. However, it does not modify the actual text. It will not remove or fix new-lines, carriage returns, tabs, or other white-space. It will not fix word-wrap or clean up your paragraphs. If you copy the source code of a web page to the clipboard, it is not going to remove all the HTML tags. If you copy text from an actual web page (not the source of the page), it will remove the formatting.

1 Answer 1

1

Autohotkey will do this for you. The following AHK script will paste the contents of the clipboard without formatting by pressing Windows+v. It saves a copy of your existing clipboard, changes the clipboard to be the same without formatting, pastes that and then sets the clipboard back to what it was before.

#v::
   Clip0 = %ClipBoardAll%
   ClipBoard = %ClipBoard%
   Send ^v
   Sleep 300 
   ClipBoard = %Clip0%
   VarSetCapacity(Clip0, 0)
   Return

To use the script, put it in a file with a .ahk extension and double-click it after you've installed Autohotkey.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.