--- loncom/xml/lonxml.pm 2004/05/27 04:25:13 1.319 +++ loncom/xml/lonxml.pm 2004/06/05 14:46:12 1.323 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.319 2004/05/27 04:25:13 albertel Exp $ +# $Id: lonxml.pm,v 1.323 2004/06/05 14:46:12 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +40,7 @@ package Apache::lonxml; use vars -qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $errorcount $warningcount); +qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $errorcount $warningcount @htmlareafields); use strict; use HTML::LCParser(); use HTML::TreeBuilder(); @@ -736,6 +736,7 @@ sub init_safespace { $safehole->wrap(\&Math::Random::random_set_seed,$safeeval,'&random_set_seed'); $safehole->wrap(\&Apache::lonxml::error,$safeeval,'&LONCAPA_INTERNAL_ERROR'); $safehole->wrap(\&Apache::lonxml::debug,$safeeval,'&LONCAPA_INTERNAL_DEBUG'); + $safehole->wrap(\&Apache::caparesponse::get_sigrange,$safeeval,'&LONCAPA_INTERNAL_get_sigrange'); #need to inspect this class of ops # $safeeval->deny(":base_orig"); @@ -1094,21 +1095,20 @@ sub storefile { } sub createnewhtml { - my $filecontents=(< - - Title of Document Goes Here - +$title - - Body of Document Goes Here - +$body SIMPLECONTENT - return $filecontents; + return $filecontents; } sub createnewsty { @@ -1129,8 +1129,24 @@ sub inserteditinfo { $filecontents = &HTML::Entities::encode($filecontents,'<>&"'); # my $editheader='Edit below
'; my $xml_help = ''; + my $initialize=''; if ($filetype eq 'html') { - $xml_help=Apache::loncommon::helpLatexCheatsheet(); + my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons(); + $initialize=&Apache::lonhtmlcommon::htmlareaheaders().(< +$addbuttons + + HTMLArea.loadPlugin("FullPage"); + + function initDocument() { + var editor=new HTMLArea("filecont",config); + editor.registerPlugin(FullPage); + editor.generate(); + } + +FULLPAGE + $result=~s/\]*)\>/\/i; + $xml_help=&Apache::loncommon::helpLatexCheatsheet(); } my $cleanbut = ''; if ($filetype eq 'html') { @@ -1147,17 +1163,19 @@ $cleanbut BUTTONS my $editfooter=(<
$xml_help $buttons
- +
$buttons
$titledisplay + ENDFOOTER # $result=~s/(\]*\>)/$1$editheader/is; $result=~s/(\<\/body\>)/$editfooter/is;