Phil Taylor

The Joomla Expert & PHP Developer

Check out my triple award winning service for Joomla - myJoomla.com

How to check spelling in Google Chrome

Please note, this is an archive post, it was originally posted on November 7, 2011 and is archived here for now. The information is probably well out of date and you should not rely on it!

This blog post is as a direct result of the years of nagging of Brian Teeman who is forever spotting spelling mistakes in my mass emails and posts.

I abandoned firefox a long time ago as my main development browser in favor of Chrome (I know, amazing eh, and I dont even miss Firebug!! Chrome tools are much better – and faster!).

Chrome (at least on a mac) highlights all incorrectly spelt words in a textarea with a red underline, but not when the page is rendered, so the following bookmarklet, when clicked, takes all the text on the page and puts it in a text area at the bottom of the page and allows Chrome to underline the spelling mistakes!

To use this just drag the following link to your bookmark bar and then click it – Hey presto!

Check Spelling

var ta=document.createElement('textarea'); 
var s=document.createAttribute('style'); 
s.nodeValue='width:100%;height:100em;';
ta.setAttributeNode(s);
ta.appendChild(document.createTextNode(document.body.innerText));
document.body.appendChild(ta);
ta.focus(); 
for(var i=1;i<=ta.value.length;i++)ta.setSelectionRange(i,i);