if (view) {
const currentHead = view.state.selection.main.head; // position of selection
const line = view.state.doc.lineAt(currentHead).number; // line number
// TODO: set highlight to the whole line.
console.log('-- check --: ', line, event);
}
I’ve got line number, and I want to set highlight to the whole line,how to do that ?