https://bugzilla.wikimedia.org/show_bug.cgi?id=63915
--- Comment #18 from Eran Roz <[email protected]> --- @physikerwelt: it is not related to user setting - the script overrides the user settings. mw.user.options.set( 'mathJax', true);//override user settings mw.loader.using(['jquery.ui.dialog','ext.math.mathjax.enabler'],function(){ var mathEditor=$('<div>'); var mathInput=$('<input>',{dir:'ltr'}).appendTo(mathEditor); var mathPreview=$('<div>').appendTo(mathEditor); mathEditor.dialog({title: 'Math editor', buttons: { 'Insert': function(){ $("#wpTextbox1").textSelection('encapsulateSelection', {replace: true, peri: '<math>'+mathInput.val()+'</math>'}); $(this).dialog('close'); } } }); mathInput.keyup(function(){ mathPreview.html('<span dir="ltr" class="tex">$ '+$(this).val()+' $</span>'); MathJax.Hub.Queue( ["Typeset", MathJax.Hub, mathPreview.get(0)]) }); var selection = $("#wpTextbox1").textSelection( 'getSelection' ); //insert the selected text into the equation editor var mathRgx=/<math>(.*)<\/math>/; if(selection && mathRgx.test(selection)){ mathInput.val(mathRgx.exec(selection)[1]); mathInput.keyup(); } }); -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
