--- loncom/xml/lonxml.pm 2008/12/07 23:41:02 1.490
+++ loncom/xml/lonxml.pm 2009/04/13 20:15:44 1.492
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.490 2008/12/07 23:41:02 www Exp $
+# $Id: lonxml.pm,v 1.492 2009/04/13 20:15:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1551,6 +1551,7 @@ sub inserteditinfo {
my $xml_help = '';
my $initialize='';
my $textarea_id = 'filecont';
+ my $dragmath_button;
my ($add_to_onload, $add_to_onresize);
$initialize=&Apache::lonhtmlcommon::spellheader();
if ($filetype eq 'html'
@@ -1588,6 +1589,10 @@ FULLPAGE
}
FULLPAGE
+ if ($filetype eq 'html') {
+ $initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup');
+ $dragmath_button = &Apache::lonhtmlcommon::dragmath_button('filecont',1);
+ }
}
$add_to_onload = 'initDocument();';
@@ -1606,9 +1611,12 @@ FULLPAGE
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=&verify_html($filecontents);
- if ($htmlerror) {
- $htmlerror=''.$htmlerror.'';
+ my $htmlerror;
+ if ($filetype eq 'html') {
+ $htmlerror=&verify_html($filecontents);
+ if ($htmlerror) {
+ $htmlerror=''.$htmlerror.'';
+ }
}
my $editfooter=(<
- $spelllink $htmlerror
+ $dragmath_button $spelllink $htmlerror