Keep color but not font or font size when copying into TextEdit

textedit

I'm copying some text from a web page into a TextEdit document. I want to be able to keep the color, but not the font or font size. Is that possible?

Best Answer

If you pop open your Web Inspector (or the equivalent in your browser) there will be a Javascript console. You can run your own code and apply your own styles to the page.

You could set all the text to be the same style, and leave the color alone:

var myStyle= document.createElement('style')
myStyle.textContent= "* { font:normal 16px/1.4 sans-serif !important; }"
document.head.appendChild(myStyle)

Then copy the text. Good enough? :)

You can make a bookmarklet, so that you can do that in one click on any page.

<a href="javascript:(function(){/*...THE ABOVE CODE...*/})()">Magic</a>

Make a text file with that content, name it magic.html, open it and drag the link to your Bookmarks bar.