Do you want to be a good Web Developer?

Enter Your Email To Get Our Exclusive Tutorials Right In Your Email

Join TalkersCode Community And Recieve Exclusive Tutorials
On Web Development In Your Email

Add Spell Checker In Your Webpage Using jQuery

Tuesday, Jan 24, 2017

Tags:- jQuery HTML


When you are publishing any content on anywhere whether it is online or offline you have to make sure your content is write and does not contain any spelling mistake because it gives a negative impact of your writing on reader.So in this tutorial we will show you how to add spell checker in your webpage using jQuery.You may also like password strength checker using jQuery.


Add Spell Checker In Your Webpage Using jQuery


To Add Spell Checker It Takes Only One Step:-

  1. Make a HTML file and define markup,scripting and styling


Step 1.Make a HTML file and define markup,scripting and styling

We make a HTML file and save it with a name spell.html

<html>
<head>
<script type="text/javascript" src='jquery.js'></script>
<script type="text/javascript" src='JavaScriptSpellCheck/include.js'></script>
<script type="text/javascript">
function checkspell()
{
 $Spelling.SpellCheckInWindow('textarea');
}
</script>
<style>
body
{
 margin:0 auto;
 padding:0px;
 text-align:center;
 width:100%;
 font-family: "Myriad Pro","Helvetica Neue",Helvetica,Arial,Sans-Serif;
 background-color:#CEE3F6;
}
#wrapper
{
 margin:0 auto;
 padding:0px;
 text-align:center;
 width:995px;
}
#text_div
{
 margin-top:20px;
}
#text_div textarea
{ 
 width:500px;
 height:150px; 
 border:none;
 padding:10px;
 font-size:17px;
}
#text_div input[type="button"]
{
 background-color:#0080FF;
 border:none;
 color:white;
 width:200px;
 height:40px;
 border-bottom:4px solid #0174DF;
 border-radius:3px;
}
</style>
</head>
<body>
<div id="wrapper">

<div id="text_div">
<textarea id="textarea" placeholder="Enter Some Text"></textarea>
<br>
<input type="button" onclick="checkspell();" value="CHECK SPELLING">
</div>

</div>
</body>
</html>

We use JavaScriptSpellCheck plugin to add spell check functionality in our webpage.In this step we create a textarea for user to enter some text to check spell checker plugin and create a button to call checkspell() function which get our text from textarea and open a small window having different buttons for different operations in it to correct spelling mistakes or insert and remove any word from dictionary.You may also like add jQuery datepicker.



That's all, this is how to add spell checker in your webpage using jQuery.You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.

Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email