--- loncom/xml/lonxml.pm 2004/06/04 22:56:46 1.322 +++ loncom/xml/lonxml.pm 2004/06/12 01:09:31 1.325 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.322 2004/06/04 22:56:46 albertel Exp $ +# $Id: lonxml.pm,v 1.325 2004/06/12 01:09:31 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -150,6 +150,7 @@ $Apache::lonxml::warnings_error_header=' sub xmlbegin { my $output=''; + @htmlareafields=(); if ($ENV{'browser.mathml'}) { $output='' .'' @@ -604,6 +605,7 @@ sub setup_globals { my ($request,$target)=@_; $Apache::lonxml::request=$request; $Apache::lonxml::registered = 0; + @Apache::lonxml::htmlareafields=(); $errorcount=0; $warningcount=0; $Apache::lonxml::default_homework_loaded=0; @@ -662,7 +664,9 @@ sub init_safespace { $safehole->wrap(\&Apache::scripttag::xmlparse,$safeeval,'&xmlparse'); $safehole->wrap(\&Apache::outputtags::multipart,$safeeval,'&multipart'); $safehole->wrap(\&Apache::lonnet::EXT,$safeeval,'&EXT'); - + $safehole->wrap(\&Apache::chemresponse::chem_standard_order,$safeeval, + '&chem_standard_order'); + $safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin'); $safehole->wrap(\&Math::Cephes::acos,$safeeval,'&acos'); $safehole->wrap(\&Math::Cephes::atan,$safeeval,'&atan'); @@ -1129,15 +1133,17 @@ sub inserteditinfo { $filecontents = &HTML::Entities::encode($filecontents,'<>&"'); # my $editheader='Edit below
'; my $xml_help = ''; - my $activate=''; my $initialize=''; if ($filetype eq 'html') { + my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons(); $initialize=&Apache::lonhtmlcommon::htmlareaheaders().(< +$addbuttons + HTMLArea.loadPlugin("FullPage"); function initDocument() { - var editor=new HTMLArea("editor"); + var editor=new HTMLArea("filecont",config); editor.registerPlugin(FullPage); editor.generate(); } @@ -1145,8 +1151,6 @@ sub inserteditinfo { FULLPAGE $result=~s/\]*)\>/\/i; $xml_help=&Apache::loncommon::helpLatexCheatsheet(); -#FIXME: need to install FullPage plugin during install -# $activate=&Apache::lonhtmlcommon::htmlareaactive(); } my $cleanbut = ''; if ($filetype eq 'html') { @@ -1175,7 +1179,6 @@ $buttons

$titledisplay -$activate ENDFOOTER # $result=~s/(\]*\>)/$1$editheader/is;