--- loncom/interface/lonhtmlcommon.pm 2008/06/01 00:04:39 1.175 +++ loncom/interface/lonhtmlcommon.pm 2008/07/07 11:02:05 1.176 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.175 2008/06/01 00:04:39 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.176 2008/07/07 11:02:05 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,6 +62,41 @@ use Apache::lonlocal; use Apache::lonnet; use LONCAPA; + +############################################## +############################################## + +=pod + +=item dragmath + +Creates a button that will allow dragmath to edit an equation into +a specified textbox. + + textarea - Name of the text area to edit. +=cut + +############################################## +# TODO: Figure out a way to only emit the mathedit function once. +# per html output document. +# +############################################## + +sub dragmath { + my ($textarea) = @_; + + return < + function mathedit(textarea, doc) { + targetEntry = textarea; + targetDoc = doc; + newwin = window.open("/adm/dragmath/applet/EditMathPopup.html","","width=565,height=500,resizable"); + } + + +ENDDRAGMATH +} + ############################################## ############################################## @@ -1922,6 +1957,8 @@ END return $scripttag; } + + 1; __END__