Roundcube Community Forum

 

Spell Check Button Greyed Out?

Started by andy, May 30, 2007, 03:36:28 AM

Previous topic - Next topic

andy

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?

darylt

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

Yann

Same problem here. Please, let me know if you found anything ::)

strictlydata

i have the same problem if I create new message. Although if I reply to an email the spelling function works!

Any ideas?

SuperATP

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?

mpc650


SimonSez07

i am experiencing this problem too. i am using roundcube v1.1 (latest stable at this time)

SimonSez07

is it possible this has to do with openssl not working properly in php?

strictlydata

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!

erikpkn

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.

SimonSez07

#10
Quote from: erikpkn;12574Seems 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

bjornostar

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. :)

mnebus

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.

s1037989

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']))