22 lines
502 B
JavaScript
22 lines
502 B
JavaScript
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('<', '<');
|
|
tex = tex.replace('>', '>');
|
|
|
|
ed.execCommand('mceInsertContent', false, tex);
|
|
|
|
tinyMCEPopup.close();
|
|
}
|
|
};
|
|
|
|
tinyMCEPopup.onInit.add(DragMathDialog.init, DragMathDialog);
|