• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

jQuery++ collection

cclaerhout

Well-known member
#3
When I was fighting with the Redactor dom functions, I've found this library: Rangy. It's really quite amazing how it's possible to manipulate dom selection & ranges with it.
Here's a general demo: http://rangy.googlecode.com/svn/trunk/demos/core.html
Here's a demo which show it's possible to serialize selection: http://rangy.googlecode.com/svn/trunk/demos/serializer.html
Here's a demo to see how it's possible to apply a css to a selection: http://rangy.googlecode.com/svn/trunk/demos/cssclassapplier.html (really good)
And another one to see how it's possible to play with caret and selection: http://rangy.googlecode.com/svn/trunk/demos/textrange.html