I created a small plugin to show whitespace in the editor (using code from an existing CodeMirror plugin, so I can’t take all the credit here )
Check out the styles.css in the plugin folder if you want to change the colour or style of the whitespace elements for your own theme.