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, 10 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.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DragMath Formula Editor -- for CKeditor</title>
<script type="text/javascript">
// <![CDATA[
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 = '$'
+ ans
+ '$';
var Api = window.opener.FCKEditorAPI;
var FCK = Api.GetInstance(opener.targetEntry);
var doc = FCK.EditorDocument;
var target = FCK.EditorWindow;
insertAtCursor(doc, target, source);
window.close();
}
// ]]>
</script>
</head>
<body>
<div id="mainContent" style="text-align:left; font-family:arial,sans-serif; font-size:large; color:#000080">
<span style="font-weight:bold;">DragMath Latex Equation Editor</span></div>
<br /><br />
<applet name="DragMath" codebase="applet" code="Display.MainApplet.class" archive="DragMath.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 action="">
<input type='button' value='Render Latex' onclick='renderLatex(); return true;' />
</form>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>