Jquery spell checker plugin for php

Rakesh Sharma      No Comments  

How to use jquery spell checker plugin for php

Sometimes we need to provide user to check their misspelled words in input or any html field we using. so in this article we will explore how to use jquery spell check plugin for php. With php we can easily integrate jquery spell checker plugin. we just need some config setup and some of path setup of given awesome inbuilt plugin for spell checker.


1 pspell extension must be enabled on your apache
2. Correct path of files

Call to undefined function SpellChecker\Driver\pspell_new() :-

if you have not pspell extension enabled you will get error Call to undefined function SpellChecker\Driver\pspell_new(). so for fix this error you must enabled pspell from php.ini

Enable pspell on ubuntu
Enable pspell on windows

Jquery spell checker plugin for php

Now below we will see how to make a code for spell check plugin setup in php. create a php file and add below code. “PATHOFSRC” will be correct path of downloaded zip src directory where src directory is located.

<!DOCTYPE html>
<html lang="en">
<link href='PATHOFSRC/src/css/jquery.spellchecker.css' rel='stylesheet'>
<script src="PATHOFSRC/src/js/libs/jquery/jquery-1.8.2.min.js"></script>
<script src="PATHOFSRC/src/js/jquery.spellchecker.js"></script>
<div class="form-group">
  <label for="notes">Notes</label>
  <textarea name="filter_notes" style="width: 100%;" id="textarea-content" class="spellcheck"></textarea>
<div id="incorrect-word-list"></div>
<button class="btn btn-danger" id="check-spelling">Check spelling</button>
    var spellchecker = new $.SpellChecker('#textarea-content', {
      lang: 'en',
      parser: 'text',
      webservice: {
        path: 'PATHOFSRC/src/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 when user clicks on button


Now you can easily integrate jquery spell checker plugin for php