File:
[LON-CAPA] /
loncom /
html /
adm /
dragmath /
applet /
FCKEditMathPopup.html
Revision
1.2:
download - view:
text,
annotated -
select for diffs
Sat Dec 28 23:58:09 2013 UTC (10 years, 8 months ago) by
raeburn
Branches:
MAIN
CVS tags:
version_2_11_X,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0,
HEAD
- xhtml changes to satisfy w3c validation.
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">
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5:
6: <title>DragMath Formula Editor -- for CKeditor</title>
7:
8: <script type="text/javascript">
9: // <![CDATA[
10: function insertAtCursor(doc, myField, myValue) {
11: //IE support
12: if (doc.selection) {
13: myField.focus();
14: sel = doc.selection.createRange();
15: sel.text = myValue;
16: }
17: //MOZILLA/NETSCAPE support
18: else if (myField.selectionStart || myField.selectionStart == '0') {
19: var startPos = myField.selectionStart;
20: var endPos = myField.selectionEnd;
21: myField.value = myField.value.substring(0, startPos)
22: + myValue + '\n\n'
23: + myField.value.substring(endPos, myField.value.length);
24: } else {
25: myField.value += myValue;
26: }
27: }
28:
29: function renderLatex() {
30: var ans = document.DragMath.getMathExpression();
31: var source = '$'
32: + ans
33: + '$';
34:
35: var Api = window.opener.FCKEditorAPI;
36: var FCK = Api.GetInstance(opener.targetEntry);
37: var doc = FCK.EditorDocument;
38: var target = FCK.EditorWindow;
39:
40: insertAtCursor(doc, target, source);
41:
42: window.close();
43:
44:
45: }
46: // ]]>
47: </script>
48:
49: </head>
50: <body>
51:
52: <div id="mainContent" style="text-align:left; font-family:arial,sans-serif; font-size:large; color:#000080">
53: <span style="font-weight:bold;">DragMath Latex Equation Editor</span></div>
54: <br /><br />
55:
56: <applet name="DragMath" codebase="applet" code="Display.MainApplet.class" archive="DragMath.jar" width="540" height="333">
57: <param name="language" value="en" />
58: <param name="showOutputToolBar" value="false" />
59: <param name="outputFormat" value="Latex" />
60: 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>
61: </applet >
62: <br />
63:
64: <form action="">
65: <input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
66: </form>
67:
68: </body>
69: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>