Author Topic: Spell Check Button Greyed Out?  (Read 8911 times)

Offline andy

  • Newbie
  • *
  • Posts: 1
Spell Check Button Greyed Out?
« on: May 30, 2007, 03:36:28 AM »
The Spell check button on my latest SVN build (587?) of RC (and all prior to it for that matter) have a grayed out spell check button. The link shows it goes to roundcube/?_task=mail&_action=compose# and just doesn't do anything. Here are my config settings:

// Make use of the built-in spell checker. It is based on GoogieSpell.
$rcmail_config['enable_spellcheck'] = TRUE;

// For a locally installed Nox Spell Server, please specify the URI to call it.
// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
// Leave empty to use the Google spell checking service, what means
// that the message content will be sent to Google in order to check spelling
$rcmail_config['spellcheck_uri'] = '';

// These languages can be selected for spell checking.
// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
// Leave empty for default set of Google spell check languages
$rcmail_config['spellcheck_languages'] = array('en'=>'English');


Any ideas on why this is set up wrong?

Offline darylt

  • Newbie
  • *
  • Posts: 8
Re: Spell Check Button Greyed Out?
« Reply #1 on: April 14, 2008, 09:58:42 AM »
I have exactly the same problem mentioned above - I am using the latest version of Roundcube.

All of the config settings are the same for me although the loink goes to http://k9-sar.com/email/?_task=mail&_action=compose&_forward_uid=28&_mbox=Sent#

Nothing happens when I click the button
Daryl

Offline Yann

  • Jr. Member
  • **
  • Posts: 46
Re: Spell Check Button Greyed Out?
« Reply #2 on: April 15, 2008, 07:54:05 PM »
Same problem here. Please, let me know if you found anything ::)

Offline strictlydata

  • Jr. Member
  • **
  • Posts: 36
Spell Check Button Greyed Out?
« Reply #3 on: May 07, 2008, 06:12:50 AM »
i have the same problem if I create new message. Although if I reply to an email the spelling function works!

Any ideas?

SuperATP

  • Guest
Spell Check Button Greyed Out?
« Reply #4 on: May 07, 2008, 11:30:53 AM »
same problem for me, it works on a reply but not on a new email!
pretty damn annoying, client of mine is moaning like hell,
any news on it?

Offline mpc650

  • Newbie
  • *
  • Posts: 1
Spell Check Button Greyed Out?
« Reply #5 on: June 05, 2008, 05:16:37 AM »
Any solution for this?

Offline SimonSez07

  • Newbie
  • *
  • Posts: 7
Spell Check Button Greyed Out?
« Reply #6 on: June 06, 2008, 08:09:58 PM »
i am experiencing this problem too. i am using roundcube v1.1 (latest stable at this time)

Offline SimonSez07

  • Newbie
  • *
  • Posts: 7
Spell Check Button Greyed Out?
« Reply #7 on: June 08, 2008, 08:52:24 AM »
is it possible this has to do with openssl not working properly in php?

Offline strictlydata

  • Jr. Member
  • **
  • Posts: 36
Spell Check Button Greyed Out?
« Reply #8 on: June 11, 2008, 07:29:21 AM »
I was hoping that Version .2 alpha would fix this error. it has not!
In my eyes this is the biggest let down of Roundcube!

Offline erikpkn

  • Newbie
  • *
  • Posts: 3
Spell Check Button Greyed Out?
« Reply #9 on: June 15, 2008, 07:32:19 AM »
Seems to me that spell checking is only not working with HTML editing. When editing normal (flat) text (HTML editing off in preferences), I can check spelling.

Offline SimonSez07

  • Newbie
  • *
  • Posts: 7
Spell Check Button Greyed Out?
« Reply #10 on: June 20, 2008, 01:54:58 PM »
Quote from: erikpkn;12574
Seems to me that spell checking is only not working with HTML editing. When editing normal (flat) text (HTML editing off in preferences), I can check spelling.

i have found this also. switching to plain text mode from the editor DOES NOT enable the button. the default mode must be set to plain-text for the spell-check option to be available. this is done globally in the file /config/main.inc.php, but can be customized by each user.

even when setting the setting "Compose HTML messages" the spell check will only work in plain-text mode. if you write a message, switch to html mode, and click spell-check, the div shows up behind the editor.

i would like to see a different spell-check plugin that works better with the mce editor. if roundcube were using the fckeditor there is a great spell-checker that uses the php pspell function and the aspell library installed on the server. i dont think this is availabel for the mce editor though.

EDIT:

i have modified 4 files to fix the spell checker. basically my fix does the following:
1) turn the button on no matter what mode you're in
2) if the button is pressed while in html mode, it tells you that you need to be in text mode to use the spell checker
3) if you are in process of checking spelling it prevents you from switching modes until you complete the spell check

you can grab my patch here: http://www.sturmer.org/download/1438/spell-patch.zip
« Last Edit: June 20, 2008, 06:09:22 PM by SimonSez07 »

Offline bjornostar

  • Newbie
  • *
  • Posts: 1
Spell Check Button Greyed Out?
« Reply #11 on: July 28, 2008, 06:15:12 PM »
Is there any real fix for this issue yet? The one above is for 0.1.1 and I'm running 0.2a

A running spell check would be nice. :)

Offline mnebus

  • Newbie
  • *
  • Posts: 1
Spell Check Button Greyed Out?
« Reply #12 on: September 09, 2008, 03:09:57 PM »
As a work around, I've suggested for my users to install firefox 3 because, not only is it not internet exploder, but it comes with spell-check built in.

...that said, a working spell check would be nice.

Offline s1037989

  • Newbie
  • *
  • Posts: 1
Patch for .2-alpha
« Reply #13 on: September 12, 2008, 11:49:47 AM »
I manually applied the changes made by Simon to .2-alpha.  It does not work for me.  But here's the patch:

# cat program.patch
diff -urN program.orig/js/app.js program/js/app.js
--- program.orig/js/app.js      2008-06-02 07:24:31.000000000 -0500
+++ program/js/app.js   2008-09-12 10:32:41.000000000 -0500
@@ -810,8 +810,11 @@
       case 'spellcheck':
         if (this.env.spellcheck && this.env.spellcheck.spellCheck && this.spellcheck_ready)
           {
-          this.env.spellcheck.spellCheck(this.env.spellcheck.check_link);
-          this.set_spellcheck_state('checking');
+            //MODIFIED BY SIMON
+//          this.env.spellcheck.spellCheck(this.env.spellcheck.check_link);
+//          this.set_spellcheck_state('checking');
+            if (this.env.spellcheck.spellCheck(this.env.spellcheck.check_link)) this.set_spellcheck_state('checking');
+            //END MODIFIED BY SIMON
           }
         break;
 
diff -urN program.orig/js/editor.js program/js/editor.js
--- program.orig/js/editor.js   2008-04-16 03:27:58.000000000 -0500
+++ program/js/editor.js        2008-09-12 10:34:52.000000000 -0500
@@ -39,6 +39,16 @@
 
 function rcmail_toggle_editor(toggler)
   {
+  //ADDED BY SIMON
+  toggler.blur();
+  if (rcmail ) if (!rcmail.spellcheck_ready) {
+    alert('Please Finish Your Spell-Check first.');
+    document.getElementById('_html').checked = false;
+    document.getElementById('_plain').checked = true;
+    return false;
+  }
+  //END ADDED BY SIMON
+
   var selectedEditor = toggler.value;
 
   // determine the currently displayed editor
diff -urN program.orig/js/googiespell.js program/js/googiespell.js
--- program.orig/js/googiespell.js      2007-05-23 22:49:19.000000000 -0500
+++ program/js/googiespell.js   2008-09-12 10:34:22.000000000 -0500
@@ -649,6 +649,14 @@
 }
 
 GoogieSpell.prototype.spellCheck = function(elm, name) {
+  //ADDED BY SIMON
+  var htmlFlag = document.getElementsByName('_is_html')[0];
+  var isHtml = htmlFlag.value;
+  if (isHtml == "1") {
+    alert('You must be in Text mode to check spelling.');
+    return false;
+  }
+  //END ADDED BY SIMON
   this.ta_scroll_top = this.text_area.scrollTop;
 
   this.appendIndicator(elm);
@@ -702,6 +710,9 @@
 
   var req_text = GoogieSpell.escapeSepcial(this.orginal_text);
   d.sendReq(GoogieSpell.createXMLReq(req_text));
+  //ADDED BY SIMON
+  return true;
+  //END ADDED BY SIMON
 }
 
 GoogieSpell.escapeSepcial = function(val) {
diff -urN program.orig/steps/mail/compose.inc program/steps/mail/compose.inc
--- program.orig/steps/mail/compose.inc 2008-06-08 13:17:09.000000000 -0500
+++ program/steps/mail/compose.inc      2008-09-12 10:35:50.000000000 -0500
@@ -403,7 +403,8 @@
   $out .= $form_end ? "\n$form_end" : '';
 
   // include GoogieSpell
-  if (!empty($CONFIG['enable_spellcheck']) && !$isHtml)
+//  if (!empty($CONFIG['enable_spellcheck']) && !$isHtml)
+  if (!empty($CONFIG['enable_spellcheck']))
     {
     $lang_set = '';
     if (!empty($CONFIG['spellcheck_languages']) && is_array($CONFIG['spellcheck_languages']))