react-codemirror
react-codemirror copied to clipboard
Can not select all text if editable={false}
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',
}}
/>
Yes, it becomes a page. You can capture shortcut keys to do what you want. @kelokchan