--- loncom/xml/lonxml.pm 2010/07/26 09:58:53 1.511 +++ loncom/xml/lonxml.pm 2010/08/07 19:23:56 1.512 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.511 2010/07/26 09:58:53 foxr Exp $ +# $Id: lonxml.pm,v 1.512 2010/08/07 19:23:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1492,45 +1492,25 @@ sub inserteditinfo { my $dragmath_button; my ($add_to_onload, $add_to_onresize); $initialize=&Apache::lonhtmlcommon::spellheader(); - if ($filetype eq 'html' - && (!&Apache::lonhtmlcommon::htmlareablocked() && - &Apache::lonhtmlcommon::htmlareabrowser())) { - $textarea_id .= '___Frame'; + if (($filetype eq 'html') && (&Apache::lonhtmlcommon::htmlareabrowser())) { my $lang = &Apache::lonhtmlcommon::htmlarea_lang(); - $initialize.=(< 'true', + dragmath => 'math', + ); + $initialize .= + &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args). + (< -lonca function initDocument() { - var oFCKeditor = new FCKeditor('filecont'); - oFCKeditor.Config['CustomConfigurationsPath'] = '/fckeditor/loncapaconfig.js' ; - oFCKeditor.Config['FullPage'] = true - oFCKeditor.Config['AutoDetectLanguage'] = false; - oFCKeditor.Config['DefaultLanguage'] = "$lang"; - oFCKeditor.ReplaceTextarea(); - } - function check_if_dirty(editor) { - if (editor.IsDirty()) { - unClean(); - } - } - function FCKeditor_OnComplete(editor) { - editor.Events.AttachEvent("OnSelectionChange",check_if_dirty); resize_textarea('$textarea_id','LC_aftertextarea'); } FULLPAGE - } else { - $initialize.=(< - function initDocument() { - resize_textarea('$textarea_id','LC_aftertextarea'); - } - -FULLPAGE - if ($filetype eq 'html' || $filetype eq 'tex') { + } + if ($filetype eq 'html' || $filetype eq 'tex') { + $dragmath_button = '
'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'
'; $initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); - $dragmath_button = &Apache::lonhtmlcommon::dragmath_button('filecont',1); - } } $add_to_onload = 'initDocument();'; @@ -1541,13 +1521,13 @@ FULLPAGE } my $titledisplay=&display_title(); - my $wysiwyglink; + my $textareaclass; my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit', 'vi' => 'Save and View', 'dv' => 'Discard Edits and View', 'un' => 'undo', 'ed' => 'Edit'); - my $spelllink .=&Apache::lonhtmlcommon::spelllink('xmledit','filecont'); + my $spelllink = &Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $textarea_events = &Apache::edit::element_change_detection(); my $form_events = &Apache::edit::form_change_detection(); my $htmlerror; @@ -1557,11 +1537,7 @@ FULLPAGE $htmlerror=''.$htmlerror.''; } if (&Apache::lonhtmlcommon::htmlareabrowser()) { - if (&Apache::lonhtmlcommon::htmlareablocked()) { - $wysiwyglink = &Apache::lonhtmlcommon::enablelink($textarea_id); - } else { - $wysiwyglink = &Apache::lonhtmlcommon::disablelink($textarea_id); - } + $textareaclass = 'class="LC_richDetectHtml"'; } } my $editfooter=(< - $dragmath_button $spelllink $htmlerror + $spelllink $htmlerror
- +$dragmath_button +
- $wysiwyglink
$titledisplay