0

First: I am not entirely sure of the difference between ranges and selections.

I want to:

  1. Highlight some text

  2. Click on a button and wrap a class around the selected text (I am able to do this using rangy, BUT rangy needs the text to be in a highlighted state, BUT that click removes the highlight on the text.)

Question:

How do i reproduce the highlighted text after that click, so that rangy has something to work with?

Thanks!

Louis
  • 146,715
  • 28
  • 274
  • 320
user1323136
  • 889
  • 2
  • 11
  • 20

1 Answers1

0

There is an example on the rangy code repository that does exactly what it seems you want.

Have a look at this: http://rangy.googlecode.com/svn/trunk/demos/highlighter.html

Rob Schmuecker
  • 8,934
  • 2
  • 18
  • 34
  • I did look at that, but never took it seriously since it was still in development stage, but it seems like it should get the job done! I think the note feature is what i was looking for, thanks for the pointer! – user1323136 Feb 11 '14 at 08:27