L
L
lleballex2020-08-01 19:12:29
JavaScript
lleballex, 2020-08-01 19:12:29

JavaScript - how to track text selection in div with contenteditable?

I 'm using Vue.JS. There is a block that can be edited. The onselect attribute on a div doesn't work. How can I track the selection of text in this block?

<div contenteditable>
  ...
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FabiBoom, 2020-08-01
@FabiBoom


You can try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question