File:
[LON-CAPA] /
loncom /
html /
adm /
dragmath /
applet /
EditMathPopup.html
Revision
1.3:
download - view:
text,
annotated -
select for diffs
Tue Aug 26 10:01:27 2008 UTC (16 years ago) by
foxr
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_X,
version_2_7_99_1,
version_2_7_99_0,
version_2_7_1,
version_2_7_0,
version_2_11_0_RC1,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
bz6209-base,
bz6209,
bz5969,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ5971-printing-apage,
BZ5434-fox,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse
Remove commented out 'dead' code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DragMath Equation Editor</title>
<script>
function insertAtCursor(doc, myField, myValue) {
//IE support
if (doc.selection) {
myField.focus();
sel = doc.selection.createRange();
sel.text = myValue;
}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos)
+ myValue + '\n\n'
+ myField.value.substring(endPos, myField.value.length);
} else {
myField.value += myValue;
}
}
function renderLatex() {
var ans = document.DragMath.getMathExpression();
var source = '<m>$'
+ ans
+ '$</m>';
var doc = opener.targetDoc
var target = doc.getElementById(opener.targetEntry);
insertAtCursor(doc, target, source);
window.close();
}
</script>
</head>
<body>
<div id="mainContent">
<DIV align=left><FONT face=Arial color=#000080
size=6><STRONG>DragMath Latex Equation Editor</STRONG></FONT></DIV>
<br><br>
<applet name="DragMath" codebase="classes" code="Display.MainApplet.class" archive="Project.jar,AbsoluteLayout.jar,swing-layout-1.0.jar,jdom.jar,jep.jar" width=540 height=333>
<param name=language value="en">
<param name=showOutputToolBar value="false">
<param name=outputFormat value="Latex">
To use this page you need a Java-enabled browser. Download the latest Java plug-in from <a href="http://www.java.com">Java.com</a>
</applet >
<br>
<form>
<input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
</form>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>