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 (15 years, 11 months 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.
1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2: <html>
3: <head>
4:
5: <title>DragMath Equation Editor</title>
6:
7: <script>
8: function insertAtCursor(doc, myField, myValue) {
9: //IE support
10: if (doc.selection) {
11: myField.focus();
12: sel = doc.selection.createRange();
13: sel.text = myValue;
14: }
15: //MOZILLA/NETSCAPE support
16: else if (myField.selectionStart || myField.selectionStart == '0') {
17: var startPos = myField.selectionStart;
18: var endPos = myField.selectionEnd;
19: myField.value = myField.value.substring(0, startPos)
20: + myValue + '\n\n'
21: + myField.value.substring(endPos, myField.value.length);
22: } else {
23: myField.value += myValue;
24: }
25: }
26:
27: function renderLatex() {
28: var ans = document.DragMath.getMathExpression();
29: var source = '<m>$'
30: + ans
31: + '$</m>';
32:
33:
34: var doc = opener.targetDoc
35: var target = doc.getElementById(opener.targetEntry);
36: insertAtCursor(doc, target, source);
37:
38: window.close();
39:
40:
41: }
42: </script>
43:
44: </head>
45: <body>
46:
47: <div id="mainContent">
48:
49:
50: <DIV align=left><FONT face=Arial color=#000080
51: size=6><STRONG>DragMath Latex Equation Editor</STRONG></FONT></DIV>
52: <br><br>
53:
54: <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>
55: <param name=language value="en">
56: <param name=showOutputToolBar value="false">
57: <param name=outputFormat value="Latex">
58: 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>
59: </applet >
60: <br>
61:
62: <form>
63: <input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
64: </form>
65:
66: </body>
67: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>