MDL-24265 adding missing dragmath dirs
authorPetr Skoda <skodak@moodle.org>
Wed, 29 Sep 2010 19:57:22 +0000 (19:57 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 29 Sep 2010 19:57:22 +0000 (19:57 +0000)
lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/img/dragmath.gif [new file with mode: 0644]
lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/js/dragmath.js [new file with mode: 0644]
lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/langs/en_dlg.js [new file with mode: 0644]

diff --git a/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/img/dragmath.gif b/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/img/dragmath.gif
new file mode 100644 (file)
index 0000000..2c3b2c4
Binary files /dev/null and b/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/img/dragmath.gif differ
diff --git a/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/js/dragmath.js b/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/js/dragmath.js
new file mode 100644 (file)
index 0000000..a9d69f4
--- /dev/null
@@ -0,0 +1,23 @@
+tinyMCEPopup.requireLangPack();
+
+var DragMathDialog = {
+    init : function(ed) {
+    },
+
+    insert : function(file, title) {
+        var ed = tinyMCEPopup.editor;
+        var tex = document.dragmath.getMathExpression();
+
+        // convert < and > to entities
+        tex = tex.replace('<', '&lt;');
+        tex = tex.replace('>', '&gt;');
+
+        if (tinymce.isIE) {tinyMCEPopup.restoreSelection();}
+
+        ed.execCommand('mceInsertContent', false, tex);
+
+        tinyMCEPopup.close();
+    }
+};
+
+tinyMCEPopup.onInit.add(DragMathDialog.init, DragMathDialog);
diff --git a/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/langs/en_dlg.js b/lib/editor/tinymce/tiny_mce/3.3.9.1/plugins/dragmath/langs/en_dlg.js
new file mode 100644 (file)
index 0000000..adc04df
--- /dev/null
@@ -0,0 +1,3 @@
+tinyMCE.addI18n('en.dragmath_dlg',{
+title:"Insert Equation"
+});
\ No newline at end of file