Placeholder line cursor.


This is my placeholder string

placeholder = '{\n\t"param1": "value1",\n\t"param1": "value1"\n}'

Cursor takes whole lines.

When I set a multi-line placeholder with @codemirror/view 6.0.0, the cursor still looks good. Are you using the drawSelection extension?

It is working with drawSelection. Iā€™m not using drawSelection. Because, selection background color will be set custom color. It is inconvenient. Is it possible without drawSelection extension?

Not really ā€” the way the browser draws the cursor is hard to control. But the background created by drawSelection can definitely be styled (see cm-selectionBackground).

1 Like

Thanks for replying