jquery - replace text between rangy position -
i have keyup event
editor.on('keyup', function(e) { selection = rangy.getselection() start = selection.anchoroffset; end = selection.focusoffset; // start , end give position consider (2, 4) // 2 start position // , 4 end position }); i replace text between position 2 , 4. how can make possible through rangy.
editor contenteeditble container.
consider following example
this testing text
now caret position after th want replace at instead of is. have positions in hand (3,4)
Comments
Post a Comment