In real time business, you have a lot of work pressure so you did some mistake on typing word is possible. To avoid this mistake we have explained the below.
For example, we created one web form in visual force page which contains comments text area. What you type as mistaken it will automatically correct. Use the below code you can achieve this.
<apex:page standardController=”Case”>
<apex:form id=”frmId”>
<apex:pageBlock title=”Case Details” mode=”edit” id=”pgBlock”>
<apex:pageblockbuttons >
<apex:commandButton action=”{!Save}” value=”Save”/>
<apex:commandButton action=”{!Cancel}” value=”Cancel”/>
<input type=”button” value=”Check Spelling” class=”btn” onclick=”doSpellingCheck()”/>
</apex:pageblockbuttons>
<apex:pageBlockSection title=”Case Fields” columns=”2″>
<apex:inputField value=”{!case.AccountId}”/>
<apex:inputField value=”{!case.contactId}”/>
<apex:inputField value=”{!case.status}” required=”true”/>
</apex:pageBlockSection>
<apex:pageBlockSection title=”Spell checking” columns=”1″ id=”section2″>
<apex:inputTextarea id=”caseDesc” value=”{!case.Description}” cols=”150″ rows=”10″ />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<script type=”text/javascript” src=”https://zaa-dev-ed.my.salesforce.com/static/111213/js/spch.js”> </script>
<script type=”text/javascript”>
function doSpellingCheck(){
doSpell({ctrl: ‘{!$Component.frmId.pgBlock.section2.caseDesc}’,
lang:’en_US’,
title:’Check Spelling’,
intLang:’en_US’,
organizationId:’00D40000000Iekr’,
userId:’00540000000nz6A’},
‘/servlet/SProxyWrapper’, document.location.protocol + ‘//’ + ‘spell-chi.salesforce.com/spellcheck’,
‘There is nothing to check’,
‘We are sorry,our spellchecker currently does not support the browser you are using. Please upgrade your browser.’,
‘The Spell Checker is not available in this language.’);
}
</script>
</apex:page>
Result:-
We are the ISV Partners and Please reach us for custom development => www.merfantz.com