--- loncom/interface/lonhtmlcommon.pm 2009/12/22 05:33:36 1.255 +++ loncom/interface/lonhtmlcommon.pm 2009/12/22 06:02:44 1.256 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.255 2009/12/22 05:33:36 faziophi Exp $ +# $Id: lonhtmlcommon.pm,v 1.256 2009/12/22 06:02:44 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1356,9 +1356,34 @@ sub htmlareaselectactive { $(this).before("
Rich formatting »
"); $("#LC_rt_"+id).click(editorHandler); }); + }); '; + foreach my $field (@fields) { + $output.=' + +{ + $(document).ready(function() { + if (!($("#'.$field.'").hasClass("LC_richAlwaysOn"))) { + if (!($("#'.$field.'").hasClass("LC_richAlwaysOff"))) { + if (!($("#'.$field.'").hasClass("LC_richDetectHtml"))) { + if (!($("#'.$field.'").hasClass("LC_richDefaultOn"))) { + if (!($("#'.$field.'").hasClass("LC_richDefaultOff"))) { + var oFCKeditor = new FCKeditor("'.$field.'"); + oFCKeditor.Config["CustomConfigurationsPath"] = + "/fckeditor/loncapaconfig.js"; + oFCKeditor.ReplaceTextarea(); + oFCKeditor.Config["AutoDetectLanguage"] = false; + oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'"; + } + } + } + } + } + }); +}'; + } $output.="\nwindow.status='Activated Editfields';\n" .'// ]]>'."\n" .'
'.