[Feature] Add Reading Mode (read-only) with code block copy button · Issue #4532 · marktext/marktext · GitHub
Skip to content

[Feature] Add Reading Mode (read-only) with code block copy button #4532

Closed

Description

@datgausaigon

Summary

Add a new "Reading Mode" that disables text editing to prevent accidental changes, and includes a one-click copy button for code blocks.

Problem it solves

Currently, MarkText provides three view modes (Source Code Mode, Typewriter Mode, and Focus Mode) as seen in my [screenshot] below. When using the application strictly to read documentation or review notes, there is a high risk of making accidental edits. Additionally, copying snippets from code blocks requires manual text selection, which is inconvenient and time-consuming.

Image

Proposed solution

Introduce a fourth mode: Reading Mode.
When this mode is activated:

  1. All text editing capabilities are disabled, making it a safe document viewer.
  2. Hovering over any [Code Block] displays a copy button in the top right corner (my screenshot below). Clicking this button copies the entire code snippet to the clipboard.

Additionally, please add an option to configure the default opening behavior:
3. Allow users to set their preferred default startup mode (e.g., Reading Mode or Edit Mode) in the settings.
4. Provide a keyboard shortcut to seamlessly toggle between Reading Mode and the editing modes after the file is opened.

Image

Alternatives considered [optional]

Currently, users must either be extremely careful not to press any keys while reading, or open the file in a separate external markdown viewer, which interrupts a seamless workflow.

Additional context [optional]

This proposal relates to and expands upon ideas mentioned in existing issues: #3688 and #3745.

Thanks
🐻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions