ASP.NET MVC: Spell Checker Extension (Now available in v14.2)

04 December 2014

Good news, you now have the ability to spell check your ASP.NET MVC editors. We've added an excellent Spell Checker extension in the v14.2 release:

DevExpress MVC Spell Checker

We've had a great spell checker control in our WebForms platform for many years. And now that same codebase has been ported as a native ASP.NET MVC extension (yes, finally). This means that the MVC spell checker is based on a solid code base, is extensible, and ready-to use in your MVC web projects.

Benefits

The SpellChecker provides you a straightforward way in which to add Microsoft Office style spell checking capabilities into your next ASP.NET MVC application and offers you built in suggestion forms that replicate corresponding forms found in Microsoft Outlook. These forms will seamlessly integrate into any web application powered by DevExpress.

Features

And it comes with these great features built-in:

  1. Custom dictionaries - Built-in support for custom dictionaries in plain text or the following ready-to-use dictionary formats: Ispell, OpenOffice and Hunspell.
  2. Ready-to-use spelling dialogs - A Microsoft Office style error indication dialog. Pre-built Spelling Options editor. Dictionary dialogs allow end-users to add unrecognized words to a dictionary. As one would expect from this type of control, end-users can build a custom word list as their needs dictate.
  3. Spelling options - Spell checker options allow you to ignore emails, URLs, mixed case/upper-case words, repeated words and words with numbers within them.
  4. API - The SpellChecker's API includes methods to check an arbitrary string, a text editor's content or all text editor controls within a specified container. You can handle specially designed events to fully manage the spell checking process - including suppression of built-in forms, modification to suggestion lists, skipped words, manual error processing, etc.

How to use

1. Use the DevExpress MVC Insert Extension dialog:

DevExpress MVC Insert Extension Dialog

Watch this short 3 minute video to learn how to use the dialog. Or if you prefer, there's a help topic too.

2. Or use the following code approach:

To add a spell checker to your project, declare the ASP.NET MVC Spell Checker extension in the Partial View and define how the callbacks will be routed back to your controller using the CallbackRouteValues property. Specify the default culture and the ID of the text control being cheсked. To add the ISpell dictionary, use the AddISpellDictionary method and specify the path to the dictionary file, the grammar file and the alphabet file. A dictionary should indicate its culture and character encoding. The CacheKey identifier enables you to access the dictionary using the Session[Dictionary.CacheKey] object.

You can subscribe to spellchecker events to perform certain actions before and after check:

Partial View code:

DevExpress MVC SpellChecker - Partial View Code

To start the check, use the SpellChecker.Check method:

View code:

DevExpress MVC SpellChecker - View Code

What do you think of the DevExpress MVC Spell Checker extension? Drop me a line below. Thanks.


Build Your Best - Without Limits or Compromise

Try the DevExpress ASP.NET MVC Extensions online now: http://mvc.devexpress.com

Read the latest news about DevExpress ASP.NET MVC Extensions: http://dxpr.es/ov1tQa

Download a free and fully-functional version now: http://www.devexpress.com/Downloads/NET/

no comments
No Comments

Please login or register to post comments.