Annotation of loncom/html/adm/dragmath/applet/EditMathPopup.html, revision 1.4
1.4 ! raeburn 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! 2: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1.1 foxr 3: <head>
1.4 ! raeburn 4: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
! 5: <title>DragMath Formula Editor</title>
1.1 foxr 6:
1.4 ! raeburn 7: <script type="text/javascript">
! 8: // <![CDATA[
1.2 foxr 9: function insertAtCursor(doc, myField, myValue) {
10: //IE support
11: if (doc.selection) {
12: myField.focus();
13: sel = doc.selection.createRange();
14: sel.text = myValue;
15: }
16: //MOZILLA/NETSCAPE support
17: else if (myField.selectionStart || myField.selectionStart == '0') {
18: var startPos = myField.selectionStart;
19: var endPos = myField.selectionEnd;
20: myField.value = myField.value.substring(0, startPos)
21: + myValue + '\n\n'
22: + myField.value.substring(endPos, myField.value.length);
23: } else {
24: myField.value += myValue;
25: }
26: }
27:
1.1 foxr 28: function renderLatex() {
29: var ans = document.DragMath.getMathExpression();
1.2 foxr 30: var source = '<m>$'
1.1 foxr 31: + ans
1.2 foxr 32: + '$</m>';
33:
34:
35: var doc = opener.targetDoc
36: var target = doc.getElementById(opener.targetEntry);
37: insertAtCursor(doc, target, source);
38:
39: window.close();
1.1 foxr 40: }
1.4 ! raeburn 41: // ]]>
1.1 foxr 42: </script>
43:
44: </head>
45: <body>
46:
1.4 ! raeburn 47: <div id="mainContent" style="text-align:left; font-family:arial,sans-serif; font-size:large; color:#000080">
! 48: <span style="font-weight:bold;">DragMath Latex Equation Editor</span></div>
! 49: <br /><br />
! 50:
! 51: <applet name="DragMath" codebase="applet" code="Display.MainApplet.class" archive="DragMath.jar" width="540" height="333">
! 52: <param name="language" value="en" />
! 53: <param name="showOutputToolBar" value="false" />
! 54: <param name="outputFormat" value="Latex" />
1.1 foxr 55: 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>
56: </applet >
1.4 ! raeburn 57: <br />
1.1 foxr 58:
1.4 ! raeburn 59: <form action="">
1.1 foxr 60: <input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
61: </form>
62:
63: </body>
64: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>