-$addbuttons
function initDocument() {
resize_textarea('$textarea_id','LC_aftertextarea');
}
FULLPAGE
+ if ($filetype eq 'html') {
+ $initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup');
+ $dragmath_button = &Apache::lonhtmlcommon::dragmath_button('filecont',1);
+ }
}
$add_to_onload = 'initDocument();';
@@ -1510,38 +1617,48 @@ FULLPAGE
$xml_help=&Apache::loncommon::helpLatexCheatsheet();
}
- my $cleanbut = '';
-
my $titledisplay=&display_title();
my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit',
'vi' => 'Save and View',
'dv' => 'Discard Edits and View',
'un' => 'undo',
'ed' => 'Edit');
- my $buttons=(<
-
-
-
-BUTTONS
- $buttons.=&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;
+ if ($filetype eq 'html') {
+ $htmlerror=&verify_html($filecontents);
+ if ($htmlerror) {
+ $htmlerror=''.$htmlerror.'';
+ }
+ }
my $editfooter=(<