Replies: 3 comments 1 reply
-
Will the following example meet your requirements? editorRef.current?.domEventHandlers({
scroll(event, view) {
console.log('scroll', view.lineBlockAtHeight(view.scrollDOM.scrollTop));
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks But your suggestion works to get the line value only when the editor scroll event occurs. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Can I access codeMirrorUt instance? (for using MDEditor > codeMirror API)
I'd like to get command line number, so I need a codeMirrorUt instance.
(view.lines, view.lineBlockAt(line().from).top, ...)
When scrolling down, it is difficult to see the entire line information in the dom.
OR, add attributes remain line number in '.cm-line' element (command line)
cc. using version "md-editor-rt": "4.13.3"
Beta Was this translation helpful? Give feedback.
All reactions