Sunday 15 July 2012

javascript - finding focus of cursor in radeditor -



javascript - finding focus of cursor in radeditor -

i using radeditor in project. want text immediate after cursor position or immediate before cursor position.

i can set html using editor.pastehtml("html") how can text before or after position?

in short should create range in content area of radeditor

var range = editor.getselection().getrange();

and obtain content selection. seek solution provided in forum thread: pastehtml after node @ cursor position?.

you can find additional info ranges in these articles:

http://www.wrox.com/wileycda/section/javascript-dom-ranges-page-2.id-292302.html http://www.quirksmode.org/dom/range_intro.html http://msdn.microsoft.com/en-us/library/ms535872%28vs.85%29.aspx

once create range in editor, can utilize getcaretposition function thread: javascript word before cursor

javascript c# telerik radeditor

No comments:

Post a Comment