https://github.com/bwydoogh/obsidian-force-view-mode-of-note
https://github.com/bwydoogh/obsidian-force-view-mode-of-note
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bwydoogh/obsidian-force-view-mode-of-note
- Owner: bwydoogh
- Created: 2021-08-08T14:49:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-07T19:38:45.000Z (over 1 year ago)
- Last Synced: 2024-06-17T22:48:52.458Z (10 months ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 146
- Watchers: 2
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - bwydoogh/obsidian-force-view-mode-of-note - (TypeScript)
README
## Obsidian force note view mode
This plug-in allows you to indicate through front matter that a note should always be opened in a certain view mode or editing mode.
Changing the **view mode** can be done through the key `obsidianUIMode`, which can have the value `source` or `preview`. Changing the **editing mode** happens by declaring the key `obsidianEditingMode`; it takes `live` or `source` as value.
Example: add below snippet (front matter) to your note ...
```
---
obsidianUIMode: source
obsidianEditingMode: live
---
```
... and this will force the note to open in "live preview" edit mode.Similar, ... add below snippet to your note ...
```
---
obsidianUIMode: preview
---
```
... and this will always open the note in a reading (/ preview) mode.This plug-in also ensures that a note is always opened in the configured default mode (suppose the Obsidian setting has "preview" as default mode but the pane is currently in "source" mode, then opening a new note in that same pane will open in "preview" mode).