--- loncom/xml/lonxml.pm 2007/08/17 20:34:31 1.450
+++ loncom/xml/lonxml.pm 2007/09/10 20:09:13 1.457
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.450 2007/08/17 20:34:31 albertel Exp $
+# $Id: lonxml.pm,v 1.457 2007/09/10 20:09:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1355,13 +1355,15 @@ sub inserteditinfo {
# my $editheader='Edit below
';
my $xml_help = '';
my $initialize='';
- my $add_to_onload;
- if ($filetype eq 'html') {
- my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons();
- $initialize=&Apache::lonhtmlcommon::spellheader();
- if (!&Apache::lonhtmlcommon::htmlareablocked() &&
- &Apache::lonhtmlcommon::htmlareabrowser()) {
- $initialize.=(<
$addbuttons
@@ -1371,21 +1373,34 @@ $addbuttons
var editor=new HTMLArea("filecont",config);
editor.registerPlugin(FullPage);
editor.generate();
+ setTimeout(
+ function () {
+ HTMLArea._addEvents(editor._doc,
+ ["keypress","mousedown"], unClean);
+ editor._iframe.id = '$textarea_id';
+ resize_textarea('$textarea_id','LC_aftertextarea');
+ },300);
}
FULLPAGE
- } else {
- $initialize.=(<
$addbuttons
function initDocument() {
+ resize_textarea('$textarea_id','LC_aftertextarea');
}
FULLPAGE
- }
- $add_to_onload = 'initDocument();';
+ }
+
+ $add_to_onload = 'initDocument();';
+ $add_to_onresize = "resize_textarea('$textarea_id','LC_aftertextarea');";
+
+ if ($filetype eq 'html') {
$xml_help=&Apache::loncommon::helpLatexCheatsheet();
}
+
my $cleanbut = '';
my $titledisplay=&display_title();
@@ -1397,27 +1412,31 @@ FULLPAGE
my $buttons=(<
-
+
BUTTONS
$buttons.=&Apache::lonhtmlcommon::spelllink('xmledit','filecont');
+ my $textarea_events = &Apache::edit::element_change_detection();
+ my $form_events = &Apache::edit::form_change_detection();
my $editfooter=(<
-