Home » Demo » Spell check plugin

PAX Spell checker plugin

This is an example of a PAX plugin: a spell checker. It uses ajax to communicate with the dictionary on the server side.


View the javascript source here.
View the server side dictionary script here, and the service script here. To view the HTML, look in the source, for the DIV with id of 'exampleSurround'.
To download, go to the download page.


How to use it

Below you will see how to use the spell plugin, in both a minimal and extended use case

Minimal use case

The spell checker requires a textarea, and a button element, take the following HTML:

<textarea name='ta' id='ta'></textarea> <button id='check'></button> And the following JavaScript: pax.load.onloaded( function() { pax.plugin.widget.spell.init( $('ta'), { url: '../examples/aspell_pax_service.php', button: $('check') } ); } ); This will setup the textarea to be checked against the example aspell pax service.

Extended use case

The spell checker can also be setup with an auto correct feature, take the following HTML:

<textarea name='ta' id='ta'></textarea> <button id='check'></button><button id='auto'></button> And the following JavaScript: pax.load.onloaded( function() { pax.plugin.widget.spell.init( $('ta'), { url: '../examples/aspell_pax_service.php', button: $('check'), auto: $('auto') } ); } ); This will setup the textarea to be checked against the example aspell pax service, and allow auto correcting.