Fix markdown/preview tab for mobile

Fixes #3813, reference #3810

Add actions and bind attributes

Handle toggleView action