vue-codemirror icon indicating copy to clipboard operation
vue-codemirror copied to clipboard

Highlighting the lines in editor

Open rohitasare7 opened this issue 1 year ago • 1 comments

Clear and concise description of the problem

I need to highlight few lines by green color, I checked codemirror documentation but I am not able to understand (apologies as I am new to vue js and codemirror) can anyone help me please? my requirement is to highlight specific lines with a green color. I am unable to join discord since the link is not active hence raised the feature request

Suggested solution

please share solution if possible.

Alternative

No response

Additional context

No response

Validations

  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

rohitasare7 avatar Dec 13 '23 18:12 rohitasare7

also I am not able to get any reference, I want to use markselection --> https://codemirror.net/5/demo/markselection.html but I am not able to get proper reference of my code editor, below is the code -->

`//codemirror import { Codemirror } from 'vue-codemirror'; import { java } from '@codemirror/lang-java'; import { oneDark } from '@codemirror/theme-one-dark'; import { EditorView } from 'codemirror';

//CodeMirror Data const extensions = [java(), oneDark, EditorView.lineWrapping]; const view = shallowRef(); const handleReady = (payload) => { view.value = payload.view; // const state = view.value.state; }`

as per the documentation (from the link I have shared)

here I am unable to get the editor reference.

rohitasare7 avatar Dec 13 '23 18:12 rohitasare7