You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like a "locked" mode or a "view only" mode that would lock the screen and not allow any editing, intentional or errant.
Additionally, it would be nice if this mode auto-updated/auto-reloaded when the file changes on disk.
What problem does this feature solve? [optional]
I use MarkText mostly as a viewer and do my editing in Vim. When I want to read my notes I use MarkText for the clean and pretty syntax. Most of the time I'll have Vim and MarkText open side by side and type in Vim and view in MarkText. The requested mode would streamline this process (with the auto-reload) and prevent unintentional changes with the lock mode.
Thanks!
Reacted by AndersonPEM, Edgar-TAMU, Alexa Schor, Tom McCaffery, Tinkerer, Dan Arthur, Nhat Nguyen, killua, Ofer Diari, d47b01 and 7 more
I support this as well, has this feature/fix been added yet? Every time I open a file, it marks it for edit even irrespective of whether I mutated/edited the content or not - I personally would consider this a bug because it doesn't enforce least-needed-privs or edit vs view. If it has not been addressed I will throw in a small donation to fix it or can also contribute if needed or it will help - I love the product but this makes it mostly unusable to me w/ VS Code w/ AI if I want to keep my flow.
Thx for the cool product though, great work everyone!
I'd like to implement this and want to agree on the design before writing code. #2451, #3910, #4532 and #3745 ask for the same thing, so they could be closed as duplicates of this issue.
Proposed behaviour:
A per-tab "Read-Only Mode" toggle in the View menu next to Typewriter/Focus, with a view.read-only-mode keybinding.
A preference, "Open files in read-only mode", off by default. It can still be switched off for a single tab.
A lock indicator on the tab while it is read-only.
In packages/muya, a setReadOnly(boolean) next to setFocusMode. It sets contenteditable="false" on the container and blocks input, paste, cut, drop and IME composition. It also suppresses the format, table, image and front-menu toolbars and task-checkbox toggling. Selection, copy, link clicks and search keep working.
A read-only tab can't have local edits, so when the file changes on disk it reloads without asking. That covers the "edit in Vim, read in MarkText" case in the original post.
Out of scope: the legacy packages/muyajs, source-code mode, and a CLI flag.
desperately need this readonly / view only mode.
ideally, when launching marktext with a file path, a CLI flag such as --readonly would be ideal.
Thanks!
Reacted by corvese, Jessica Souza and Clemens Haas
I just want to reinforced the request. It would be nice to be able to click links directly in this mode too. Unless I'm missing something, right now I need to hover on the link and wait for an icon to appear, so I can click the icon to follow the link.
I discovered Marktext recently and it's awesome. Thanks for all the great work!
Update: I also use lots of HTML tags, like spam, to add color, and when I click on the text with them, it shows the tags. It would be nice if the tags don't show up on click in this read only mode.
BTW, @xronocode the native support of reading mode is on the way #5793, Muya natively supports read-only mode; you are welcome to port Muya into your application when the time comes.
you are welcome to port Muya into your application when the time comes.
Thanks @Jocs
Interesting to see this coming to Muya natively. Watching #5793; we'll revisit porting fresh Muya once it lands.
Activity
andersonpem commentedon Nov 8, 2023
I also support this feature :)
shantanu-wdev commentedon Nov 11, 2023
+1
aunjaffery commentedon Dec 4, 2023
+1
I want this Locking feature... Other then that marktext is pretty awesome.
alexaschor commentedon Sep 11, 2024
This would be a lovely addition!
Maziar123 commentedon Oct 14, 2025
me need also
cocco580 commentedon Apr 21, 2026
This feature it's very useful. It can built it as the fourth view mode, together with "Source Code", "Typewriter" and "Focus"
dswicegood commentedon May 21, 2026
I support this as well, has this feature/fix been added yet? Every time I open a file, it marks it for edit even irrespective of whether I mutated/edited the content or not - I personally would consider this a bug because it doesn't enforce least-needed-privs or edit vs view. If it has not been addressed I will throw in a small donation to fix it or can also contribute if needed or it will help - I love the product but this makes it mostly unusable to me w/ VS Code w/ AI if I want to keep my flow.
Thx for the cool product though, great work everyone!
anandghegde commentedon Sep 19, 2026
I'd like to implement this and want to agree on the design before writing code. #2451, #3910, #4532 and #3745 ask for the same thing, so they could be closed as duplicates of this issue.
Proposed behaviour:
view.read-only-modekeybinding.packages/muya, asetReadOnly(boolean)next tosetFocusMode. It setscontenteditable="false"on the container and blocks input, paste, cut, drop and IME composition. It also suppresses the format, table, image and front-menu toolbars and task-checkbox toggling. Selection, copy, link clicks and search keep working.Out of scope: the legacy
packages/muyajs, source-code mode, and a CLI flag.Questions:
Cmd+Option+Ris alreadyview.dev-reloadon macOS. Should the new keybinding ship unbound?If this sounds right, I'll open a PR against
develop.sid-the-sloth commentedon Sep 26, 2026
desperately need this readonly / view only mode.
ideally, when launching marktext with a file path, a CLI flag such as
--readonlywould be ideal.Thanks!
jessicaione101 commentedon Oct 2, 2026
I just want to reinforced the request. It would be nice to be able to click links directly in this mode too. Unless I'm missing something, right now I need to hover on the link and wait for an icon to appear, so I can click the icon to follow the link.
I discovered Marktext recently and it's awesome. Thanks for all the great work!
Update: I also use lots of HTML tags, like spam, to add color, and when I click on the text with them, it shows the tags. It would be nice if the tags don't show up on click in this read only mode.
xronocode commentedon Oct 19, 2026
This comes up a lot, so here's what works today.
Mark, a Tauri 2 port of Mark Text I maintain (https://github.com/xronocode/mark), has a reading mode. View › Lock Document makes the current tab read-only, the tab header shows "Read-only", and a click on the page switches back to editing. There's also
mark --preview file.mdfor the CLI, and a setting that opens documents launched from Finder in reading view. Downloads and overview: https://mark.xronocode.comHappy to write up how we did the read-only state over Muya if that's useful here.
Jocs commentedon Oct 19, 2026
BTW, @xronocode the native support of reading mode is on the way #5793, Muya natively supports read-only mode; you are welcome to port Muya into your application when the time comes.
xronocode commentedon Oct 19, 2026
feat: add per-tab reading mode (#3688, #4532, #3745)