Auto-Hide Post Editor Preview

As a user, there’s no setting to hide the preview by default. As an admin of a Discourse install, you can do it in a theme-component.

You’d use something like this in the header tab of your theme, or in a theme-component:

<script type="text/discourse-plugin" version="0.8">
controller = api.container.lookup('controller:composer');

controller.reopen({
  showPreview: false 
})
</script>

and that would make the composer open with the preview hidden by default.

I’d be careful about such a change though because it would apply to all the users on your community. Some of these users might actually prefer to have the preview visible by default.

7 Likes