K2LL33D SHELL

 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 / plugins / fmath_formula / js /
server ip : 172.67.156.115

your ip : 172.70.80.203

H O M E


Filename/var/www/html/sman1baleendahok/tiny_mce/plugins/fmath_formula/js/dialog.js
Size1.99 kb
Permissionrw-rw-r--
Ownerulung : ulung
Create time27-Apr-2025 11:12
Last modified05-Feb-2025 08:55
Last accessed03-May-2025 17:30
Actionsedit | rename | delete | download (gzip)
Viewtext | 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);