--- loncom/xml/lonxml.pm 2023/12/29 23:40:37 1.531.2.24.2.1 +++ loncom/xml/lonxml.pm 2024/02/28 18:33:00 1.531.2.24.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.531.2.24.2.1 2023/12/29 23:40:37 raeburn Exp $ +# $Id: lonxml.pm,v 1.531.2.24.2.2 2024/02/28 18:33:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1708,8 +1708,9 @@ FULLPAGE my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit', 'vi' => 'Save and View', 'dv' => 'Discard Edits and View', - 'un' => 'undo', - 'ed' => 'Edit'); + 'un' => 'Undo', + 'ed' => 'Edit', + 'ew' => 'Edit with Daxe'); my $spelllink = &Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $textarea_events = &Apache::edit::element_change_detection(); my $form_events = &Apache::edit::form_change_detection(); @@ -1717,7 +1718,7 @@ FULLPAGE if ($filetype eq 'html') { $htmlerror=&verify_html($filecontents); if ($htmlerror) { - $htmlerror=''.$htmlerror.''; + $htmlerror=(' 'x3).' '.$htmlerror.''; } if (&Apache::lonhtmlcommon::htmlareabrowser()) { unless ($textareaclass) { @@ -1725,7 +1726,7 @@ FULLPAGE } } } - my ($undo,%onclick); + my ($undo,$daxebutton,%onclick); foreach my $item ('discard','undo','daxe') { $onclick{$item} = 'onclick="still_ask=true;setmode(this.form,'."'$item'".')"'; } @@ -1737,6 +1738,13 @@ FULLPAGE $onclick{'undo'}.' />'."\n"; } $initialize .= &setmode_javascript(); + if ($filetype eq 'html') { + my %editors = &Apache::loncommon::permitted_editors(); + if ($editors{'daxe'}) { + $daxebutton = ''."\n"; + } + } my $editfooter=(< @@ -1755,7 +1763,7 @@ $initialize
- $undo $htmlerror $deps_button $dragmath_button + $undo $deps_button $daxebutton $dragmath_button $htmlerror

$spelllink @@ -1773,10 +1781,15 @@ sub setmode_javascript { @@ -1788,8 +1801,13 @@ sub seteditor_javascript {