[3400] | 1 | Version 2.8
|
---|
| 2 |
|
---|
| 3 | If you use this code, please give me credit. I'd also like to see where you're using it. So send me urls!
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | See http://www.broken-notebook.com/spell_checker for the change log and further documentation.
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | ==============================HOW TO USE==================================
|
---|
| 10 |
|
---|
| 11 | Just unzip all the contents to the same directory. You also need to make
|
---|
| 12 | sure the personal_dictionary.txt file in the personal_dictionary directory
|
---|
| 13 | is chmodded to 646.
|
---|
| 14 |
|
---|
| 15 | Just include cpaint2.inc.compressed.js, spell_checker.js, and spell_checker.css
|
---|
| 16 | in the head of your page.
|
---|
| 17 |
|
---|
| 18 | The spell checker can be added to any text area on the page. I chose to use
|
---|
| 19 | the title and accesskey attributes instead of custom attributes for two reasons.
|
---|
| 20 | One, they're not used very frequently, and two, so that the code would still be
|
---|
| 21 | valid XHTML.
|
---|
| 22 |
|
---|
| 23 | Just add the title attribute to your text area and make it equal to "spellcheck"
|
---|
| 24 | and set the accesskey attribute equal to the location of the spell_checker.php
|
---|
| 25 | file and the Javascript will do the rest.
|
---|
| 26 |
|
---|
| 27 | Make sure you include a width and a height as well as a name and an id.
|
---|
| 28 | Name and id should be unique.
|
---|
| 29 |
|
---|
| 30 | <textarea title="spellcheck" accesskey="spell_checker.php" id="spell_checker1" type="text" name="comment1" style="width: 400px; height: 200px;" />Text of box check</textarea>
|
---|
| 31 |
|
---|
| 32 | ==========================================================================
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | Note - This code requires php and the pspell module to work correctly.
|
---|
| 36 | It has only been tested on Firefox and Internet Explorer so far, and I'm
|
---|
| 37 | told that it works fine in Safari and some versions of Opera too.
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 | If you find any bugs or anything please email me and let me know.
|
---|
| 41 |
|
---|
| 42 | Garrison Locke
|
---|
| 43 |
|
---|
| 44 | gplocke@broken-notebook.com
|
---|
| 45 |
|
---|
| 46 | http://www.broken-notebook.com |
---|