--- loncom/interface/lonhtmlcommon.pm 2012/09/04 11:01:54 1.321 +++ loncom/interface/lonhtmlcommon.pm 2012/09/10 09:51:06 1.322 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.321 2012/09/04 11:01:54 foxr Exp $ +# $Id: lonhtmlcommon.pm,v 1.322 2012/09/10 09:51:06 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1212,7 +1212,7 @@ ENDEDITOR - + ENDJQUERY @@ -1402,6 +1402,30 @@ sub htmlareaselectactive { }); } }); + + /* This code describes the spellcheck options that will be used for + items with class 'spellchecked'. It is necessary for those objects' + to explicitly request checking (e.g. onblur is a nice event for that). + */ + \$(document).ready(function() { + \$(".spellchecked").spellchecker({ + url: "/ajax/spellcheck", + lang: "en", + engine: "pspell", + suggestionBoxPosition: "below", + innerDocument: true + }); + \$("textarea.spellchecked").spellchecker({ + url: "/ajax/spellcheck", + lang: "en", + engine: "pspell", + suggestionBoxPosition: "below", + innerDocument: true + }); + + }); + + JAVASCRIPT if ($dragmath_prefix ne '') { $output .= '