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

2 posts, 0 answers
  1. Balaji
    Balaji avatar
    15 posts
    Member since:
    May 2012

    Posted 07 Sep 2012 Link to this post


     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.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Sep 2012 Link to this post

    Hi Balaji,

    Please try the following code to achieve your scenario.

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

    Hope this helps.

Back to Top