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
Hi there!
When I'm confugiring that a user cannot write in editor, I used to use readonly prop. However, It was still possible to create selection which may point ouside of document as in Video 1, link below, HEADPHONE WARNING. However, when I also add editable prop to be editable={!isReadonly}, everything works fine, Image 1.
The props of CodeMirror is a bit confusing since it has two explicit props.
Seeing the same issue - readonly doesn't stop key commands being sent to the editor. You only see the cursor move if you type in the middle of a doc, but if you type at the end new characters are appended to the doc and the error shows.
Hi there!
When I'm confugiring that a user cannot write in editor, I used to use
readonly
prop. However, It was still possible to createselection
which may point ouside of document as in Video 1, link below, HEADPHONE WARNING. However, when I also addeditable
prop to beeditable={!isReadonly}
, everything works fine, Image 1.The props of
CodeMirror
is a bit confusing since it has two explicit props.Video 1:
https://user-images.githubusercontent.com/51142471/196690444-369a156f-7e19-4c83-9daf-15977340ff9c.mp4
Image 1:
In the video below, because I had only
readOnly={false}
prop, it broke. If I addeditable={!isReadOnly}
prop, everything works fine.The text was updated successfully, but these errors were encountered: