89
$\begingroup$

Screenshot

screenshot showing new preview below comment entry textbox

About

When writing a comment with a lot of formatting, especially one containing formulas, I often found myself pasting it into the "new answer" editor at the bottom of the page to see if everything was rendering properly. But this is kind of tedious.

So, I've written a userscript that creates a new live preview directly beneath any comment you compose or edit. This script has made writing such comments a much nicer experience for me so I hope others enjoy it as well.

It works on all Stack Exchange sites (as far as I know) but I wrote it with Math SE in mind. MathJax is rendered in the new preview just like when you're writing an answer, if a little more slowly.

Installation

In Chrome, install Tampermonkey then click here.

This script does not work in Firefox (yet?).

More info

More information can be found in the StackApps post for this script. Even more can be found on its GitHub page, including a list of known issues.

$\endgroup$
  • 5
    $\begingroup$ I sure could use something like that. It took me several edits to get my comment on math.stackexchange.com/questions/1492741/… halfway decent. $\endgroup$ – Lisa Oct 22 '15 at 21:37
  • 1
    $\begingroup$ As some one who consults the documentation for literally every jax he posts... i.imgur.com/oyPuynm.jpg $\endgroup$ – corsiKa Oct 25 '15 at 22:28
  • $\begingroup$ I am almost positive that meta.stackexchange will reject this as a feature request. There are only a handful of sites that use MathJax, so need any comment formatting at all. They would see this as extra hassle and reject the idea. $\endgroup$ – Ali Caglayan Oct 27 '15 at 12:00
  • $\begingroup$ @Alizter, while making this I experimented with using Stack Exchange's own editor functionality to create the previews by temporarily turning the comment boxes into pseudo answer boxes. It turned out that the way MathJax is implemented caused this not to work very well. I had never noticed before, but only one editor can be active on a page. Try editing someone's answer, cancelling the edit, then scrolling down and typing some TeX into the New Answer box; it will not render it. Now imagine that happening after only writing a comment! $\endgroup$ – Antonio Vargas Oct 27 '15 at 15:20
  • $\begingroup$ In summary I would agree that adding this feature to this site could definitely be a lot of hassle and might even require a nontrivial change to how MathJax is implemented here. $\endgroup$ – Antonio Vargas Oct 27 '15 at 15:20
  • $\begingroup$ This is a test, I'm gonna retract the vote in 5 min $\endgroup$ – Surb Nov 3 '15 at 16:38
  • $\begingroup$ Excellent$\;\;\;\;$ $\endgroup$ – suomynonA Nov 13 '16 at 19:58

You must log in to answer this question.

Browse other questions tagged .