Tag Archives: Spell checker

How to enable Sharepoint spell checker in custom pages ?

1. Make sure you have the right page directive on the page you are adding the control to

 <%@ Register TagPrefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls” Assembly=”Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>

2. On the head of your page, add the following controls, which will give you the javascript required for the spell checker to run:

<SharePoint:ScriptLink ID=”ScriptLink1″ Language=”javascript” Name=”core.js” runat=”server” />
<SharePoint:ScriptLink ID=”ScriptLink2″ Language=”javascript” Name=”bform.js” runat=”server” />
<SharePoint:ScriptLink ID=”ScriptLink3″ Language=”javascript” Name=”SpellCheckEntirePage.js” runat=”server” />

3. Add the following block of javascript code to your page:

<script language=”javascript” type=”text/javascript”>
function doSpellCheck() {
SpellCheckEntirePage(‘/_vti_bin/SpellCheck.asmx’, ‘/_layouts/SpellChecker.aspx’);
NOTE: Take care of single quotes after pasting
4. Now all you need to do is create a link or a button which starts the spell checker. to this you just need to add the onclick javascript method ‘doSpellCheck()’

<a href=”javascript:doSpellCheck()”>Spelling…</a>

NOTE: if you want to exclude spell checker of any control use excludeFromSpellCheck”true”


Posted by on January 18, 2011 in Sharepoint Designer, Tips & Tricks