Word by Word from RadRichtextbox

2 posts, 0 answers
  1. Andreas
    Andreas avatar
    4 posts
    Member since:
    Oct 2017

    Posted 08 Jan 2018 Link to this post

    How can I get word by word from RadRichtextbox ? For instance:

    ---------------------------------------------------------

    %
    {#Program}{toollist}
    G0 G90 X49 {N_block}

    ---------------------------------------------------------

    I need follow result. Sometimes I have spaces between word sometimes not.
    So I think I have to split between all ABCDE...XYZ and between { } characters.

    word[1]="%"
    word[2]="{#Program}"
    word[3]="{loollist}"
    word[4]="G0"
    word[5]="G90"
    word[6]="X49"
    word[7]={N_block}

     

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3469 posts

    Posted 09 Jan 2018 Link to this post

    Hello, Andreas,   

    Thank you for writing.  

    I suppose that your question is related to RadRichTextEditor since RadRichTextBox is deprecated. You can get the RadRihTextEditor.Text property and split it by the desired symbols ("%", "{", "}"," "). Thus, you will obtain the words collection you need. Alternatively, you can traverse the hierarchical document's structure. In this case, it is necessary to iterate all document's sections, section's paragraphs and spans inside the paragraph. However, splitting the text is a much easier approach.

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top