This is a migrated thread and some comments may be shown as answers.

how to get getRange on get_html?

1 Answer 47 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 09 May 2012, 01:31 PM
Hi,

   My input on RadEditor Control: ram ram ravan

   after some manipulation, i have modified the above text as "ram ram <FONT class=masked>ra</FONT>van".

   My requirement is the last word "van", if the user select "a" on van text, i want the index of a in the above text. Please help me how to get the index.

I have used the below code to get the selected text range of pure text but not with html tags, how to get range and index with html tags.

    var Range = editor.getSelection().getRange();
        var index= - Range.move("character", -1000000);

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 May 2012, 11:39 AM
Hello,

The following Wrox article could be helpful for your scenario: http://www.wrox.com/WileyCDA/Section/JavaScript-DOM-Ranges-Page-2.id-292302.html

You can find more information in this help article: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-delete-and-backspace-key-issue.aspx

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Balaji
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or