Showing posts with label spell checking. Show all posts
Showing posts with label spell checking. Show all posts

Thursday, April 4, 2013

ckeditor spell checking plugin

1. Download plugin
2. View Plugin.js
3. Include the jQuery and the Spellchecker files in the <head> section of your page:
<link href="css/jquery.spellchecker.css" rel="stylesheet" />
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/jquery.spellchecker.min.js"></script>
 
// Create a new spellchecker instance
var spellchecker = new $.SpellChecker('textarea', {
  lang: 'en',
  parser: 'text',
  webservice: {
    path: '../../webservices/php/SpellChecker.php',
    driver: 'pspell'
  },
  suggestBox: {
    position: 'above'
  },
  incorrectWords: {
    container: '#incorrect-word-list'
  }
});

// Bind spellchecker handler functions
spellchecker.on('check.success', function() {
  alert('There are no incorrectly spelt words.');
});

// Check the spelling
$("button#check").click(function(e){
  spellchecker.check();
});