width="540" height="300"
>
<param name="language" value="<?php echo $lang; ?>" />
- <param name="outputFormat" value="Latex" />
+ <param name="outputFormat" value="MoodleTex" />
<param name="showOutputToolBar" value="false" />
<?php print_string('dragmath:dragmath_javaneeded', 'editor_tinymce', '<a href="http://www.java.com">Java.com</a>')?>
</applet>
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);