Freigeben über


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! :-)

Comments

  • Anonymous
    April 17, 2006
    Mikhail Arkhipov just released a spell checker that validates spelling in HTML and ASP.NET pages within...

  • Anonymous
    April 17, 2006
    Thanks for a nice addin

  • Anonymous
    April 17, 2006
    This is the type of plug-in that I wish I had last week :)&amp;nbsp; Mikhail has built an amazing plug-in...

  • Anonymous
    April 17, 2006
    Bardzo ciekawy plugin sprawdzający pisownię stron ASP.NET.

  • Anonymous
    April 17, 2006
    This really rocks (on my machine), but a coworker can't get it running. Any ideas on logging or what-not to see why?  The add-in doesn't appear on the Tools/Add-in Manager... dialog and we don't get an option in the Tools menu.  His installation worked fine, files are all in "C:Program FilesHTML Spell Checker Add-In" directory.  He's got Office 2003 installed (like me), and the PIAs are installed (like me).

  • Anonymous
    April 17, 2006
    The comment has been removed

  • Anonymous
    April 17, 2006
    The comment has been removed

  • Anonymous
    April 17, 2006
    Thanks

  • Anonymous
    April 17, 2006
    The comment has been removed

  • Anonymous
    April 18, 2006
    Well, if you are like me, you do!&amp;nbsp; When building web applications and switching between code and...

  • Anonymous
    April 18, 2006
    The comment has been removed

  • Anonymous
    April 18, 2006
    I posted some troubleshooting steps here:

    http://blogs.msdn.com/mikhailarkhipov/archive/2006/04/18/578529.aspx

  • Anonymous
    April 18, 2006
    The comment has been removed

  • Anonymous
    April 18, 2006
    Cool...

  • Anonymous
    April 18, 2006















    This looks cool. Check out http://blogs.msdn.com/mikhailarkhipov/archive/2006/04/17/577471.aspx






  • Anonymous
    April 19, 2006
    Mikhail
    from the Visual Studio Web Tools Team just published a cool free
    plug-in for VS 2005 (that...

  • Anonymous
    April 19, 2006
    This trick fixed my installation:

    regsvr32 vsspellchecker.dll

    Thanks!

  • Anonymous
    April 19, 2006
    Wow! Thanks for such a great plugin!!!

  • Anonymous
    April 19, 2006
    I just found this little gem via ScottGu; it a spell checker writen by
    Mikhail
    Arkhipov &amp;nbsp;for use...

  • Anonymous
    April 19, 2006
    PingBack from http://www.ellisweb.net/2006/04/items-of-interest-20060420/

  • Anonymous
    April 20, 2006
    Any chance you could add support for other files types such as xslt and xml?

  • Anonymous
    April 20, 2006
    Trackback from dotnetkicks.com

  • Anonymous
    April 20, 2006
    A few people asked if HTML Spell Checker can check XML and XSLT files. Not directly, as XML files are...

  • Anonymous
    April 20, 2006
    How to run spell check on XML files:
    http://blogs.msdn.com/mikhailarkhipov/archive/2006/04/20/579980.aspx

  • Anonymous
    April 20, 2006
    Thanks, It's really a cool one...

  • Anonymous
    April 20, 2006
    PingBack from http://kieranbrennan.wordpress.com/2006/04/21/no-spelling-mistakes/

  • Anonymous
    April 21, 2006
    One of my fellow Telligenti (Rich Mercer) alerted me to a new addon for Visual Studio 2005, by Mikahil...

  • Anonymous
    April 27, 2006

    Mikhail from the Visual Studio Web Tools Team just published a cool free plug-in for VS 2005 (that...

  • Anonymous
    April 28, 2006
    Actually, it's possible to have a right click menu in the editor in Visual Studio.

    http://www.mailframe.net/Products/CodeSpell/ -- doesn't require Office

  • Anonymous
    April 28, 2006
    All editors in VS are different. The underlying core text editor is the same, but each language or designer provides its own colorization, intellisense and context menus. Some provide ways to extend context menu and some don't. Sure, you can always override right click by subclassing a window and provide a new one that looks like the original one plus some new items, but I decided that maybe I'll do it next time.

  • Anonymous
    April 29, 2006
    PingBack from http://www.ieatdirt.com/web-design/2006/spell-check-for-aspnet

  • Anonymous
    May 03, 2006
    Looking for a way of checking your HTML and ASP.NET&amp;nbsp;markup for spelling errors in Visual Studio...

  • Anonymous
    May 04, 2006
    Mikhail Arkhipov on our team recently developed a spell checker add-in to Visual Studio 2005 that allows...

  • Anonymous
    May 08, 2006
    Fantastic , I like it.

  • Anonymous
    June 26, 2006
    Can I use Visual Web Developer Express for the project I am planning? Do I need to buy Visual Studio...

  • Anonymous
    February 21, 2007
    Overview I recently ditched my AMD desktop machine and picked up an ASUS G1 notebook. I like ASUS...

  • Anonymous
    April 29, 2007
    I finally got around to implementing support for multiple languages in my HTML / ASP.NET spell checker

  • Anonymous
    November 14, 2007
    Any chance for you to share the source code?

  • Anonymous
    December 18, 2008
    PingBack from http://blogs.msdn.com/mikhailarkhipov/archive/2007/12/31/spell-checker-update-2-1-a-few-bug-fixes-and-couple-of-new-features.aspx