More tweaks
Make the AJAX endpoint configurable (this could still be done better). Use POST, rather than GET for the AJAX request, so that we don't have to worry about overly-long equations.
This commit is contained in:
parent
cb1fe51e84
commit
85e0a2cb10
|
@ -20,6 +20,7 @@ $(function() {
|
||||||
se_ns = "http://svg-edit.googlecode.com",
|
se_ns = "http://svg-edit.googlecode.com",
|
||||||
htmlns = "http://www.w3.org/1999/xhtml",
|
htmlns = "http://www.w3.org/1999/xhtml",
|
||||||
mathns = "http://www.w3.org/1998/Math/MathML",
|
mathns = "http://www.w3.org/1998/Math/MathML",
|
||||||
|
ajaxEndpoint = "../../itex",
|
||||||
editingitex = false,
|
editingitex = false,
|
||||||
svgdoc = S.svgroot.parentNode.ownerDocument,
|
svgdoc = S.svgroot.parentNode.ownerDocument,
|
||||||
started,
|
started,
|
||||||
|
@ -65,7 +66,7 @@ $(function() {
|
||||||
try {
|
try {
|
||||||
math = svgdoc.createElementNS(mathns, 'math');
|
math = svgdoc.createElementNS(mathns, 'math');
|
||||||
// make an AJAX request to the server, to get the MathML
|
// make an AJAX request to the server, to get the MathML
|
||||||
$.get('../../itex', {'tex': tex, 'display': 'inline'}, function(data){
|
$.post(ajaxEndpoint, {'tex': tex, 'display': 'inline'}, function(data){
|
||||||
math.setAttributeNS(xmlnsns, 'xmlns', mathns);
|
math.setAttributeNS(xmlnsns, 'xmlns', mathns);
|
||||||
math.setAttribute('display', 'inline');
|
math.setAttribute('display', 'inline');
|
||||||
var semantics = document.createElementNS(mathns, 'semantics');
|
var semantics = document.createElementNS(mathns, 'semantics');
|
||||||
|
|
Loading…
Reference in a new issue