--- loncom/xml/lonxml.pm 2007/08/17 20:34:31 1.450
+++ loncom/xml/lonxml.pm 2007/08/29 21:49:38 1.454
@@ -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.454 2007/08/29 21:49:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1355,12 +1355,14 @@ sub inserteditinfo {
# my $editheader='Edit below
';
my $xml_help = '';
my $initialize='';
- my $add_to_onload;
+ my $textarea_id = 'filecont';
+ my ($add_to_onload, $add_to_onresize);
if ($filetype eq 'html') {
my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons();
$initialize=&Apache::lonhtmlcommon::spellheader();
if (!&Apache::lonhtmlcommon::htmlareablocked() &&
&Apache::lonhtmlcommon::htmlareabrowser()) {
+ $textarea_id .= '_htmlarea';
$initialize.=(<
$addbuttons
@@ -1371,6 +1373,13 @@ $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
@@ -1379,13 +1388,16 @@ FULLPAGE
FULLPAGE
}
$add_to_onload = 'initDocument();';
+ $add_to_onresize = "resize_textarea('$textarea_id','LC_aftertextarea');";
$xml_help=&Apache::loncommon::helpLatexCheatsheet();
}
+
my $cleanbut = '';
my $titledisplay=&display_title();
@@ -1402,22 +1414,26 @@ $cleanbut
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=(<
-