diff --git a/lib/editor/tinymce/plugins/dragmath/dragmath.php b/lib/editor/tinymce/plugins/dragmath/dragmath.php
index 9a1b2cf27e6..017f7d17c11 100644
--- a/lib/editor/tinymce/plugins/dragmath/dragmath.php
+++ b/lib/editor/tinymce/plugins/dragmath/dragmath.php
@@ -46,7 +46,7 @@ if (!file_exists("$CFG->dirroot/lib/dragmath/applet/lang/$lang.xml")) {
width="540" height="300"
>
-
+
Java.com')?>
diff --git a/lib/editor/tinymce/plugins/dragmath/js/dragmath.js b/lib/editor/tinymce/plugins/dragmath/js/dragmath.js
index c9c24f601c7..53760b826fd 100644
--- a/lib/editor/tinymce/plugins/dragmath/js/dragmath.js
+++ b/lib/editor/tinymce/plugins/dragmath/js/dragmath.js
@@ -1,34 +1,21 @@
tinyMCEPopup.requireLangPack();
var DragMathDialog = {
- init : function(ed) {
-
- },
-
-
+ init : function(ed) {
+ },
- insert : function(file, title) {
-
- var ed = tinyMCEPopup.editor;
- var mathExpression = document.dragmath.getMathExpression();
- //
- // TBD any massaging needed here?
- //
- var text = mathExpression;
- // convert < and > to entities
- text = text.replace('<', '<');
- text = text.replace('>', '>');
- //
- // Escape the expression
- //
- text = '$$' + text + '$$';
- ed.execCommand('mceInsertContent', false, text);
+ insert : function(file, title) {
+ var ed = tinyMCEPopup.editor;
+ var tex = document.dragmath.getMathExpression();
- tinyMCEPopup.close();
- }
+ // convert < and > to entities
+ tex = tex.replace('<', '<');
+ tex = tex.replace('>', '>');
-
-
+ ed.execCommand('mceInsertContent', false, tex);
+
+ tinyMCEPopup.close();
+ }
};
tinyMCEPopup.onInit.add(DragMathDialog.init, DragMathDialog);