summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2008-04-15 21:22:00 +0000
committersvncommit <devs@roundcube.net>2008-04-15 21:22:00 +0000
commitd9344fc349e8c5765898c90bf5061e56cd21c8a0 (patch)
treea5916f5f3f88df8d6336b43dde8cdbb49cb47bdc /program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php
parentd7a411f099596cbc8e749e1f0802ac2bb2c6289e (diff)
HTML editing fixes, upgrade to TinyMCE v3.0.6
Diffstat (limited to 'program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php')
-rw-r--r--program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php64
1 files changed, 0 insertions, 64 deletions
diff --git a/program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php b/program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php
deleted file mode 100644
index 21fb19448..000000000
--- a/program/js/tiny_mce/plugins/spellchecker/classes/TinyPspell.class.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- *
- */
-
-class TinyPSpell {
- var $lang;
- var $mode;
- var $string;
- var $plink;
- var $errorMsg;
-
- var $jargon;
- var $spelling;
- var $encoding;
-
- function TinyPSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- $this->mode = $mode;
- $this->plink = false;
- $this->errorMsg = array();
-
- if (!function_exists("pspell_new")) {
- $this->errorMsg[] = "PSpell not found.";
- return;
- }
-
- $this->plink = pspell_new($this->lang, $this->spelling, $this->jargon, $this->encoding, $this->mode);
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($wordArray) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for checkWords.";
- return array();
- }
-
- $wordError = array();
- foreach($wordArray as $word) {
- if(!pspell_check($this->plink, trim($word)))
- $wordError[] = $word;
- }
-
- return $wordError;
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for getSuggestion.";
- return array();
- }
-
- return pspell_suggest($this->plink, $word);
- }
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyPspell";
-
-?> \ No newline at end of file