Commit graph

10 commits

Author SHA1 Message Date
Jacques Distler c946c331e1 Update extensions for new SVG-Edit API 2010-03-12 10:48:27 -06:00
Jacques Distler 5a5ff87286 Fix Bug in itex Extension
Firefox was too lenient, in allowing
you to append nodes from another document to
the svg canvas. Use adoptNode(), to do things
right. (Google Chrome is more strict about this.)
2010-03-05 16:19:12 -06:00
Jacques Distler e75c0cc81c Sync with latext SVG-Edit
Subpath tool.

Also make the itex tool a little more selective
(only applies to <foreignObject>s with a <math> firstChild.
2010-03-04 00:05:36 -06:00
Jacques Distler aa0a151ba4 Uniquify IDs in SVG-Edit
Since we can have several SVG-Edit graphics
on a page, SVG-Edit should assign unique IDs
to elements, and do so in a fashion that survives
re-editing.

To do this, we use a nonce, and record its value in
a custom se:nonce attribute on the <svg> element.
(Is there a better way?). 

Also, preserve the custom se:connector attribute for
later editing purposes.
2010-02-25 02:25:16 -06:00
Jacques Distler 4cd626ef49 Cleanup itex extension
Most of the DOM manipulations can be done
before doing the AJAX call. This leaves
just the insertion of the MathML nodes in the
mrow for the AJAX callback function.

Also, make the stroke-width for the connector tool 
default to 2.
2010-02-23 17:24:23 -06:00
Jacques Distler d201f79766 No Need to Double-Escape
Apparently, JQuery takes care of all of the
escaping we need. So ditch our own escaping
(which effectively double-escaped everything).
2010-02-23 10:16:14 -06:00
Jacques Distler 42d92a0b37 More ext-itex.js Fixes
Ajax is asynchronous. Need to 
sanitize in the callback function,
NOT when adding <math> to the DOM.

Need to unescape text for itex editor
window (since JQuery seems to take care
an 'extra' round of escaping).
2010-02-22 23:20:57 -06:00
Jacques Distler 85e0a2cb10 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.
2010-02-22 21:50:38 -06:00
Jacques Distler cb1fe51e84 Don't need an xmlns:xlink on the math element
itex2MML puts one on the mrows that are hyperlinks.
2010-02-22 21:35:29 -06:00
Jacques Distler 702b450fd9 itex Endpoint
Add a Rack Metal itex endpoint.
Add an itex tool to SVG-Edit.
Disable the foreignObject tool
(at least, for now) as it doesn't
currently play nice with the itex tool.
2010-02-22 00:05:52 -06:00