Defaut Edit/Preview mode per file in YAML front matter

Use case or problem

Sometimes we have finished MD files which we would like to see always in Preview mode and others which we are creating and Edit mode is our default. It would be nice to put a piece of config information in the frontmatter in each file and when a file would be open in Obsidian it will use this information and run the appropriate mode.

Proposed solution

frontmatter parameter to control edit/preview mode

Current workaround (optional)

Manually change mode

Related:

7 Likes

Overlapping feature request:

Not sure if to merge these since there are differences.


Suggestion for this one:

3 Likes

+1 for this feature.

For example I use Dataview for rendering overview pages.
These are not modified at all, so it would be very useful to have these pages always be displayed in preview mode by setting a flag in YAML section.

As a workaround, I’m using the force-view-mode-of-note community plugin. After you have installed it, you can put

----
obsidianUIMode: preview
----

in your frontmatter to force preview mode. (Of course you can also force edit mode).

2 Likes