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

How to get the index from editor.get_html()?

1 Answer 16 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 07 Sep 2012, 12:37 PM
Hi,

 For ex, I am getting the output from editor.get_html() like "aaa <span class='masked'>bbb</span> ccc". I need the index of ccc from the html which i got from editor. Please share it.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Sep 2012, 07:20 AM
Hi Balaji,

Please try the following code to achieve your scenario.

JS:
<script type="text/javascript">
  function OnClientClicked()
  {
   var editor = $find("<%= RadEditor1.ClientID %>");
   var content = editor.get_html();
   var indx = content.indexOf("ccc");
  }
</script>

Hope this helps.

Thanks,
Princy.
Tags
Editor
Asked by
Balaji
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or