1

I have something like this:

<div class="content" contenteditable="true">
  <p>Some text</p>
  <p>Some other text</p>
</div>

Right now I can do .content p:hover (e.g. color: red) to manipulate the CSS. But that only works with the cursor.

How can I do it so I can manipulate CSS based on the caret's position (specific paragraph)?

alexchenco
  • 50,467
  • 73
  • 227
  • 400

0 Answers0