uiwjs / uiwjs/react-codemirror
Can not select all text if editable={false}
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
I have this code in the app for user to copy the code snippet, but I do not want the user to accidentally edit the code. I added editable={false} to the <CodeMirror /> component. But when I press cmd+A or ctrl+A, I couldn't select the text within the component.
<CodeMirror
editable={false}
extensions={[html()]}
width="100%"
height="250px"
value={`123123123123123`}
style={{
fontSize: '14px',
}}
/>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the shown configuration, starting from the editable={false} option and the editor's selection handling. Done means Cmd+A or Ctrl+A selects all displayed text while editing remains disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100