-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll to a specific line in codemirror #617
Comments
@GevinHasmitha I don't understand what you mean. Do you want to scroll to the specified line? |
@jaywcjlove Yes, I want the editor to scroll to the line where my added classname is present when i click on a button. (Im adding the classname using the classnameExt extension) |
react-codemirror/extensions/events/src/index.ts Lines 18 to 48 in bf3b862
|
|
That only works if the lines are of equal height. When using CodeMirror as a text-editor that might not be the case. |
I'm adding a classname to a specific line in the codemirror using classnameExt function provided by uiw codemirror. I have access to the classname and the line number of the specific line. I want to scroll to that specific line on a button click.
<CodeMirror id="codemirrorId" value={value} height={height} theme={darkMode ? aura : xcodeLight} extensions={extensions} onChange={onChange} readOnly={readOnly} color="text.primary" />
This is my codemirror component, how can i scroll to the specific line which has my classname?
The text was updated successfully, but these errors were encountered: