Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

The editor does not allow selection of text in readonly mode #60

@systoyanov

Description

@systoyanov

When trying to select text inside the content element(with "readOnly" enabled) the selected text gets deselected upon right mouse click so it's impossible for the user to copy it via the context menu.
In my POV the problem comes from the clearSelection method in SelectionHandler class which could be evolved to respect the read only mode.

I patched it locally with a simple
if(this.readOnly) { return; }
in the beginning of the method.

This suits my needs but as I'm not familiar with all the features it is possible that it's a very usecase realated fix and will break some other usecases I don't use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions