Spell Checker for HTML and ASP.NET pages

This article is obsolete. Please look here for newer version https://blogs.msdn.com/webdevtools/archive/2008/11/29/spell-checker-update-2-2-full-support-for-vs-2008-sp1-simpler-setup-and-a-few-bug-fixes.aspx  

Updated version is available here: https://blogs.msdn.com/mikhailarkhipov/archive/2007/12/12/spell-checker-for-html-asp-net-jscript-vb-c-css-and-c.aspx 

I finally finished writing HTML spell checker add-on to Visual Studio. Spell checker works in Source view, it is able to extract text from markup elements and use Office 2003 spell checker to check the text. Spell checker is able to handle entities to some extent (they are considered whitespace for now). It is also able to spell check values of attributes that typically contain human readable text. You can customize spell checker behavior by editing an XML file. Since the add-on uses Office spelling engine, you must have Office 2003 or at least Word 2003 installed. Spell checker uses active Office dictionary. Therefore if page is in Japanese, but primary dictionary set in Office is in English, spell checking will be done in English. Current version does not merge words split by tags, such as <b>S</b>ymbol. I am planning to add this functionality in a future version. Right click on the misspelled word does not bring suggestions, double-click does. This is because right-click in VS 2005 HTML editor is hardcoded for the context menu and cannot be overridden.

Important note: add-on does not work with Visual Web Developer Express as Express editions are not extensible.
 

Disclaimer:

The software is provided "AS IS" with no warranties of any kind. The entire risk arising out of the use or performance of the software is with you. I wrote this software in my own spare time, it is not supported by Microsoft Corporation. The software is provided in a binary form, free of charge. If you wish to report bugs or suggest improvements, you can either post bug report here in comments or send bug report to me using email link at the top of this page.

Requirements:

Microsoft Visual Studio 2005, any edition except Express.
Microsoft Word 2003

Installation

Close Visual Studio
Download and run Setup.msi
Run Visual Studio
Open a Web site or standalone HTML file.
You should see HTML Spell Checker entry in the Tools menu.

Uninstall

Close Visual Studio
Open Control Panel
Go to Add/Remove Programs
Locate HTML Spell Checker Add-in to Visual Studio 2005 and click Remove

How to use the Spell Checker

Open a Web Form, HTML or ASP file and click Tools | HTML Spell Checker. Spell check may take 10-15 seconds on decently sized file. There is no immediate progress indication, but you may see that squiggles under misspelled words appear one by one. You should get squiggles under misspelled words. Double click on misspelled word brings list of suggestions. closes the suggestion list. Spell checker messages also show up in the Error List as informational messages. They are not entered as errors or warnings so they don't break builds.

Limitations:

1. Spell checker only works in Source view.
2. Spell checker is using active Office dictionary. Therefore if page is in Japanese, but primary dictionary set in Office is in English, spell checking will be done in English.
3. Current version does not merge words split by tags, such as <b>S</b>ymbol. I am planning to add this functionality in a future version.
4. Right click on the misspelled word does not bring suggestions, double-click does. This is because right-click in VS 2005 HTML editor is hardcoded for the context menu and cannot be overridden.
5. No progress indication.

Customization

You can customize spell checker behavior by editing rules.xml file located in Program Files\HTML Spell Checker Add-In. You can exclude certain elements and add more rules for attribute checking. You probably want to do that if you are using custom controls and want spell checker to verify spelling in custom control attribute values. All element and attribute names much be in lowercase. You don't have to close the HTML document or Visual Studio after editing the file, the file is loaded every time spell checking is performed.

<?xml version="1.0" encoding="utf-8"?>
<rules>
<!-- Exclude content of script and style elements from spell check -->
<exclude name="script" />
<exclude name="style" />

<!-- Check 'value' attribute on all elements without a namespace -->
<element name="*">
<attribute name="value" />
</element>

<!-- Rules in ASP namespace -->
<namespace name="asp">

<!-- Check all attributes ending in 'text' as well as tooltip attribute in all ASP.NET elements -->
<element name="*">
<attribute name="*text" />
<attribute name="tooltip" />
</element>

<!-- Special rule for asp:Calendar -->
<element name="calendar">
<attribute name="caption" />
</element>

<!-- Add more rules for ASP.NET elements here if needed -->
</namespace>

<!-- Add rules for custom controls here if needed -->

</rules>

Spell checking XML files:

See here https://blogs.msdn.com/mikhailarkhipov/archive/2006/04/20/579980.aspx

Troubleshooting:

Look here: https://blogs.msdn.com/mikhailarkhipov/archive/2006/04/18/578529.aspx

Running HTML Spell checker on all ASP.NET and HTML files in the solution:

Look here: https://blogs.msdn.com/mikhailarkhipov/archive/2006/05/29/610380.aspx

New version with multilanguage support: https://blogs.msdn.com/mikhailarkhipov/archive/2007/04/29/spell-checker-for-html-and-asp-net-multilanguage-edition.aspx

Download location. Enjoy! :-)