diff --git a/editor/extensions/ext-mathjax.js b/editor/extensions/ext-mathjax.js
new file mode 100644
index 00000000..d41446b0
--- /dev/null
+++ b/editor/extensions/ext-mathjax.js
@@ -0,0 +1,271 @@
+/*
+ * ext-mathjax.js
+ *
+ * Licensed under the Apache License
+ *
+ * Copyright(c) 2013 Jo Segaert
+ *
+ */
+
+svgEditor.addExtension("mathjax", function() {
+ // Configuration of the MathJax extention.
+
+ // This will be added to the head tag before MathJax is loaded.
+ var mathjaxConfiguration = '',
+ mathjaxSrc = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
+ mathjaxSrcSecure = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG.js',
+ math,
+ locationX,
+ locationY,
+ mathjaxLoaded = false,
+ uiStrings = svgEditor.uiStrings;
+
+ // TODO: Implement language support.
+ $.extend(uiStrings, {
+ mathjax: {
+ embed_svg: 'Save as mathematics',
+ embed_mathml: 'Save as figure',
+ svg_save_warning: 'The math will be transformed into a figure is manipulatable like everything else. You will not be able to manipulate the TeX-code anymore. ',
+ mathml_save_warning: 'Advised. The math will be saved as a figure.',
+ title: 'Mathematics code editor'
+ }
+ });
+
+
+ function saveMath() {
+ var code = $('#mathjax_code_textarea').val();
+ // displaystyle to force MathJax NOT to use the inline style. Because it is
+ // less fancy!
+ MathJax.Hub.queue.Push(['Text', math, '\\displaystyle{' + code + '}']);
+
+ /*
+ * The MathJax library doesn't want to bloat your webpage so it creates
+ * every symbol (glymph) you need only once. These are saved in a