Tuesday, July 1, 2008

made CharRange(Selection Class)

I also write English.

I made Selection Class that crossbrowse and DOM/MSDN Bases.
It's a prototype base.

I think helpful for user to use TextRange, Selection, and getRangeAt...

site: syany valley
file:CharRange
document:doc

name is CharRange

usable
var range = new CharRange.Selection();
alert("Range: "+ range.selection());


you can get selection strings.

and...

Modify class is very powerful
var range_mod = new CharRange.Selection.Modify();
range.selection();
// change red background
if (range.length()) range.update('span', {background: '#FF0000'});


to change red background
and can use className, Attribute.

How do you think it?
I'm so glad if I'm to help you.
thanks download..

No comments: