User talk:Js/preview2.js
Fixes
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Could someone apply this bug fix to the script? Currently it does not works on Translatewiki, because $wgLegacyJavaScriptGlobals seems to be set to false there (and will be false here as well in the future). Helder 22:54, 25 October 2012 (UTC)
frm.wpSummary is undefined
I got
from the following line when trying to do a preview in a new topic on Wikidata:
data = { title: mw.config.get('wgPageName'), text: txt, summary: frm.wpSummary.value}
Helder 17:18, 12 November 2012 (UTC)
Add MathJax compatibility
![]() | It is requested that an edit be made to the interface-protected user page at User:Js/preview2.js. (edit · history · last · links · protection log)
This template must be followed by a complete and specific description of the request, that is, specify what text should be removed and a verbatim copy of the text that should replace it. "Please change X" is not acceptable and will be rejected; the request must be of the form "please change X to Y".
The edit may be made by any interface administrator. Remember to change the |
Could you replace
if (window.ajaxPreviewExec) ajaxPreviewExec(wkPreview[0])
by something like
if ( $( '.tex' ).length ){
mw.loader.using( 'ext.math.mathjax.enabler', function () {
$('#wikiPreview').renderTex();
} );
}
if (window.ajaxPreviewExec) ajaxPreviewExec(wkPreview[0])
to make the script work with the mathjax code from mw:Extension:Math? See gerrit:61183 for details. Helder 17:01, 1 June 2013 (UTC)