Allow table sorting in all markdown areas

Fixes #1917

Bonus: You can now sort tables in the live preview.