Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / sman1baleendahok / tiny_mce_asli / plugins / fmath_formula / js / | server ip : 104.21.89.46 your ip : 172.70.80.237 H O M E |
Filename | /var/www/html/sman1baleendahok/tiny_mce_asli/plugins/fmath_formula/js/dialog.js |
Size | 1.99 kb |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:12 |
Last modified | 05-Feb-2025 08:55 |
Last accessed | 08-Jul-2025 03:01 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
//-------------------------------------------------------------
// Created by: Ionel Alexandru
// Mail: [email protected]
// Site: www.fmath.info
//---------------------------------------------------------------
tinyMCEPopup.requireLangPack();
var MathML_FormulaDialog = {
init : function() {
},
insert : function() {
var urlServer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var mathml = document.getElementById('mathml_f').value;
mathml = mathml.replace("<math>", "");
mathml = mathml.replace("</math>", "");
if(mathml.indexOf("<?")==0){
mathml = mathml.substring(mathml.indexOf("/>") + 2);
}
mathml = mathml.replace(/\n/g,"");
mathml = mathml.replace(/m:m/g,"m");
var imgName = document.getElementById('mathml_n').value;
var newName = tinyMCEPopup.editor.plugins["fmath_formula"].addMathML(mathml);
var imgTag = '<img id="'+newName+'" src="'+imgName+'" border="0"/>';
tinyMCEPopup.editor.execCommand('mceInsertContent', false, imgTag);
var currentElem = tinyMCEPopup.editor.dom.get(newName);
currentElem.setAttribute('src', imgName);
tinyMCEPopup.close();
},
update : function() {
var urlServer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var name = tinyMCEPopup.editor.plugins["fmath_formula"].getSelected();
var urlViewer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var mathml = document.getElementById('mathml_f').value;
mathml = mathml.replace("<math>", "");
mathml = mathml.replace("</math>", "");
if(mathml.indexOf("<?")==0){
mathml = mathml.substring(mathml.indexOf("/>") + 2);
}
mathml = mathml.replace(/\n/g,"");
mathml = mathml.replace(/m:m/g,"m");
tinyMCEPopup.editor.plugins["fmath_formula"].updateMathML(name, mathml);
var imgName = document.getElementById('mathml_n').value;
tinyMCEPopup.editor.dom.setAttrib(name, 'src', imgName);
tinyMCEPopup.close();
}
};
tinyMCEPopup.onInit.add(MathML_FormulaDialog.init, MathML_FormulaDialog);
// Created by: Ionel Alexandru
// Mail: [email protected]
// Site: www.fmath.info
//---------------------------------------------------------------
tinyMCEPopup.requireLangPack();
var MathML_FormulaDialog = {
init : function() {
},
insert : function() {
var urlServer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var mathml = document.getElementById('mathml_f').value;
mathml = mathml.replace("<math>", "");
mathml = mathml.replace("</math>", "");
if(mathml.indexOf("<?")==0){
mathml = mathml.substring(mathml.indexOf("/>") + 2);
}
mathml = mathml.replace(/\n/g,"");
mathml = mathml.replace(/m:m/g,"m");
var imgName = document.getElementById('mathml_n').value;
var newName = tinyMCEPopup.editor.plugins["fmath_formula"].addMathML(mathml);
var imgTag = '<img id="'+newName+'" src="'+imgName+'" border="0"/>';
tinyMCEPopup.editor.execCommand('mceInsertContent', false, imgTag);
var currentElem = tinyMCEPopup.editor.dom.get(newName);
currentElem.setAttribute('src', imgName);
tinyMCEPopup.close();
},
update : function() {
var urlServer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var name = tinyMCEPopup.editor.plugins["fmath_formula"].getSelected();
var urlViewer = tinyMCEPopup.editor.plugins["fmath_formula"].getUrlViewer();
var mathml = document.getElementById('mathml_f').value;
mathml = mathml.replace("<math>", "");
mathml = mathml.replace("</math>", "");
if(mathml.indexOf("<?")==0){
mathml = mathml.substring(mathml.indexOf("/>") + 2);
}
mathml = mathml.replace(/\n/g,"");
mathml = mathml.replace(/m:m/g,"m");
tinyMCEPopup.editor.plugins["fmath_formula"].updateMathML(name, mathml);
var imgName = document.getElementById('mathml_n').value;
tinyMCEPopup.editor.dom.setAttrib(name, 'src', imgName);
tinyMCEPopup.close();
}
};
tinyMCEPopup.onInit.add(MathML_FormulaDialog.init, MathML_FormulaDialog);