Index: openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 3 Nov 2003 12:32:38 -0000 1.11 +++ openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 21 Nov 2003 15:11:03 -0000 1.11.2.1 @@ -341,20 +341,23 @@ # That's either because spell-checking is disabled for this element, or we're not dealing with a submit. # Whichever it is, let's see if, and then how, we should render the spellcheck "sub widget". - if { [empty_string_p [nsv_get spellchecker path]] } { + # Do the "cheap" checks first and then (if needed) read the parameter and do additional checks. - # The aspell or ispell binary was not found during server startup - turn spell-checking off. + if { [string equal "display" $element(mode)] \ + || [info exists element(nospell)] \ + || [empty_string_p [nsv_get spellchecker path]] } { + set spellcheck_p 0 } else { + array set widget_info [string trim [parameter::get_from_package_key \ -package_key acs-templating \ -parameter SpellcheckFormWidgets \ -default ""]] set spellcheck_p [expr [array size widget_info] \ - && ![info exists element(nospell)] \ && ([string equal $element(widget) "richtext"] || [string equal $element(widget) "textarea"] || [string equal $element(widget) "text"]) \ && [lsearch -exact [array names widget_info] $element(widget)] != -1] Index: openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 3 Nov 2003 12:32:38 -0000 1.4 +++ openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 21 Nov 2003 15:11:02 -0000 1.4.2.1 @@ -152,6 +152,7 @@ array set element { id test_element widget text + mode edit } set command {template::util::spellcheck::spellcheck_properties -element_ref element}