Read Only View - keep selected notes in Reading view to avoid accidental edits

Disclaimer

Is this project open source? Yes
Is this project completely free? Yes
Is this project vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory Link: Read Only View


Hi everyone :waving_hand:

I use Obsidian mostly as a collection of Markdown notes and personal summaries. A lot of the time I’m not actively editing them — I’m just rereading them from my phone or tablet.

One thing that kept happening to me: I would accidentally tap the screen while reading, Obsidian would switch into edit mode, and the keyboard would open. It’s a small thing, but after it happens often enough, it becomes annoying — especially on mobile.

So I made a small plugin: Read Only View.

Read-Only-View-note-example

It keeps selected Markdown notes in Reading view based on include and exclude path rules. The goal is not to provide real file-level security or OS-level locking. It is more like a simple “anti-accidental-edit” layer for notes that you mostly read.

What it can be useful for

  • folders with summaries or reference notes
  • archive folders
  • documentation notes
  • notes you often read from mobile/tablet
  • shared or semi-stable vault content
  • any notes where accidental editing is more annoying than useful

How it works

You define include/exclude rules based on vault paths.

For example, you can keep everything inside a folder in Reading view:

Notes/Summaries/

Or include a folder but exclude drafts:

Include:
Notes/Summaries/

Exclude:
Notes/Summaries/Drafts/

By default, matching is simple path/prefix-based. Glob patterns can also be enabled if you need more flexible rules.

The plugin also includes:

  • include/exclude rules
  • optional glob patterns
  • case-sensitive matching
  • diagnostics for ignored or invalid rules
  • path tester
  • command palette actions
  • desktop and mobile support

Links

I’d be happy to get feedback, especially from people who also use Obsidian as a reading/reference vault on mobile or tablet.

1 Like

Small update for this thread: Read Only View 1.0.6 is out.

The main fix is for read-only enforcement inside hover preview editors. If a matching note is opened in hover preview, the plugin should now keep it in Reading view more reliably.

I also refreshed the README screenshots so the setup flow is easier to understand.

Hi!

Not an issue with the plugin, but I noticed on the community site the images are cropped a bit odd. Not sure if it’s something you can fix on your end, but just thought I’d let you know. :grinning_face:

Hi!

Thanks for noticing and letting me know! I’ve tweaked the preview screenshots a bit, they should look better now. Appreciate the heads-up! :slightly_smiling_face:

Small update for this thread: Read Only View 1.0.7 is out.

This one is not a feature release, but more of a stability pass.

I spent some time auditing the plugin internals and tightened a few edge cases around hover previews, popout windows, lifecycle cleanup, and settings handling. The plugin now does a better job cleaning up delayed work when it is disabled/reloaded, handles popout-related observer logic more carefully, validates saved settings on startup, and does less unnecessary work while editing rules in the settings tab.

I also added more regression tests around rule matching, hover preview handling, settings validation, debounced saves/renders, and cleanup behavior.

So the visible behavior should mostly stay the same, but 1.0.7 should be a bit more reliable in weird cases like fast switching, popouts, hover previews, and settings edits.

Hi everyone,

Here’s a bigger update for this thread: Read Only View 1.1.2 is out.

I’ve changed a lot in the plugin recently. I focused on the settings UI, rule management, and read-only behaviour.

The goal was to make the plugin easy to use after installation. Advanced options will still be available if needed.

New Settings UI

The settings screen is now organised around the main workflow:

  • Plugin status and active rule count
  • Global Enabled toggle
  • Read-only mode selection
  • Path rules
  • Path tester
  • Advanced matching/debug options

Less common settings are now in Advanced. This includes glob matching and case sensitivity.

There is also a warning when All Markdown files mode is active, since it affects the entire vault.

Two Read-Only Modes

There are now two explicit modes.

All Markdown Files

This mode keeps every Markdown note in Reading view.

If a file or folder should remain editable, add an Exclude rule and enter its path in the Value field.

For example:

workspace/

Everything else stays protected.

Only Matched Paths

This mode is closer to the original behaviour of the plugin.

Add an Include rule for the folder or note you want to protect.

For example:

Notes/Summaries/

If part of that folder should remain editable, add an `Exclude` rule for it:

Notes/Summaries/Drafts/

Exclude rules always take priority.

Switching modes keeps your rules safe. You can try different setups. If you want, you can switch back later.

Reworked Path Rules

Include and Exclude rules now share the same editor.

Each rule has:

  • An enable/disable checkbox
  • Include/Exclude type
  • One Value field
  • Delete action

You can temporarily disable rules without deleting them. This makes it easier to try out different settings.

The Value field can now accept several input types:

  • Vault paths
  • Obsidian URLs
  • Absolute system paths on desktop

A normal vault path still works:

Projects/

You can also paste an Obsidian URL:

obsidian://open?vault=MyVault&file=Projects%2FREADME

Or, on desktop, an absolute system path:

/Users/name/Documents/MyVault/Projects/

The plugin resolves these into paths inside the current vault.

Absolute system paths are not stored. Only the portable vault-relative path is kept. This way, the rule still works on mobile and tablet.

Improved Path Tester

The Path tester has also been reworked.

You can paste a vault path, Obsidian URL, or system path and see:

  • What kind of input was detected
  • Which vault path it resolves to
  • Matching Include rules
  • Matching Exclude rules
  • Whether the global mode affects the result
  • The final Read-only or Editable status

This should make it much easier to understand why a note is or isn’t protected.

Mobile and Tablet Improvements

The settings UI now switches to a compact stacked layout on smaller screens.

I often use Obsidian on my mobile and tablet. I want rule editing, resolved paths, and error messages to be easy to use on those devices too.

Rules made from system paths on desktop still use their saved vault paths on mobile.

Read-Only Behaviour

I’ve also continued improving the actual read-only enforcement.

Protection now uses two layers:

  • Blocking editor input in CodeMirror-backed Markdown editors
  • Automatically returning protected notes to Reading view

This aims to improve behaviour in Page Preview and Hover Preview. Changing the normal workspace view isn’t always enough.

We welcome your feedback and bug reports. This is especially true for edge cases linked to Obsidian’s internal view behaviour.

The basic idea of the plugin remains the same:

Read Only View is meant to help prevent accidental edits.

It does not change file-system permissions and is not intended to be a security boundary.

The plugin makes no network requests, and all rule matching stays local.

Links

If you try the plugin, I’d love to hear your thoughts.
What do you think of the new settings workflow?
I’m especially interested in feedback from mobile and tablet users, or those with complex Include/Exclude setups.