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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -