Skip to content

Commit 39bf8d4

Browse files
committed
Set readOnly to 'nocursor' in markdown editor
Using 'nocursor' when readOnly is true, ensures the blinking caret is hidden avoiding confusion if editing or not.
1 parent bff8c8f commit 39bf8d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/public/components/common/markdown/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const markdownFromTextarea = (textarea, readOnly, size) => {
165165

166166
const editor = hyperMD.fromTextArea(textarea, {
167167
hmdModeLoader: '/assets/SmartEditor/codemirror',
168-
readOnly,
168+
readOnly: readOnly ? 'nocursor' : false,
169169
lineNumbers: !readOnly,
170170
extraKeys: {
171171
'Ctrl-Space': 'autocomplete',

0 commit comments

Comments
 (0)