Make use of a nonce for setting SVG-Edit IDs
option. By default, SVG-Edit behaves as before.
Calling svgCanvas.randomizeIds(true) gives our
behaviour, instead.
Also, sync with latest SVG-Edit (but disable,
for now, manual editing of IDs).
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.
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.
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).
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.
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.
Line-height is inherited, and the setting in SVG-Edit
ever-so-slightly screws up foreignObject (the bounding box
is not where it should be. This can be fixed in the CSS
(and was, till the great migration to the extensions folder).
Further whittling away at differences between
Instiki's and the main branch of SVG-Edit.
Now, the saveHandler is set from within the calling
page.
If the editor was opened from Instiki, choosing "Save Image"
now closes the editor window. To leave it open was kinda confusing.
Also sync with latest SVG-Edit changes.
Thanks to Alexis Deveria. (Though I did fix one small bug.)
My patch-file is now down to a mere 178 lines (a big
chunk of which is Revision 569).
Also, the font-size for foreignObjects defaults to 16pt,
which will be more useful in Instiki.
Pass the SVG to the editor, using
editor.svgCanvas.setSvgString(selected);
instead. (Suggested by Jeff Schiller)
Fix a bug with line and freehand tools caused
by activating foreignObject tool. (Again, fix
due to Jeff)
Sync with SVG-Edit.
Added support so that you can
create new foreignObjects, manipulate
existing ones, and edit their content.
No itex support. You need to use MathML
in there. But it's a start ...
They are now selectable, draggable, resizable
and rotatable.
The MathML content behave strangely when you
resize, but snaps back to its correct size when
you let go of the mouse.
(Resizing the MathML involves changing the font-size
on the containing foreignObject. No interface for
that, yet.)
Support Marhdown Extra's fenced code blocks. [From Jason Blevins]
Fortran syntax colouring. [From Jason Blevins]
Turn on Syntax colouring, by default.
Point to Michel Fortin's Markdown Extra page.
Omit a (seemingly superfluous)
javascript hack which causes
Gecko-based browsers to request
/my_wiki/s5/null
when they load an s5 slideshow.
Also a stylistic cleanup in
the wiki_controller.
itex2MML 1.3.16 add a \tooltip{}{} command which,
like \statusline{}{}, produces an <maction> element.
Neither of these is natively supported by Mozilla/Firefox.
Add some Javascript to work around that weakness.
Add some default CSS support for syntax colouring of code blocks.
Try:
require 'chunks/chunk'
{:lang=ruby html_use_syntax=true}
or
<div xhtml:class='foo' width='4'>bar<!-- fubar --></div>
{:lang=html html_use_syntax=true}
(Suggested by Casper Gripenberg)
Dunno why this was buggered again. ":back" doesn't seem to function as it used to.
Also, when uploading a file from page "foo", it's important to return to "foo" after
a successful upload, rather than redirecting to the HomePage.
Finally, a favicon tweak.
Updated to Rails 2.2.2.
Added a couple more Ruby 1.9 fixes, but that's pretty much at a standstill,
until one gets Maruku and HTML5lib working right under Ruby 1.9.
Implement amsthm-like Theorem environments with Maruku.
Support is based on Maruku "div"s with special class-names.
Classes
num_*
produce numbered environments, and
un_*
produce un-numbered environments, where * is one of
theorem (for Theorem)
lemma (for Lemma)
prop (for Proposition)
cor (for Corollary)
def (for Definition)
example (for Example)
remark (for Remark)
note (for Note)
In addition, the class
proof
produces a Proof environment.
The LaTeX export works as expected, and these also work in the S5 view.
Bumped version number.
Slide notes are now served correctly (as application/xhtml+xml) to compatible
browsers. So you can put math in your notes, and the MathML will render.
We don't do real content-negotioation. IE gets text/html; everyone else gets application/xhtml+xml.