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

Word by Word from RadRichtextbox

1 Answer 12 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 08 Jan 2018, 03:49 PM

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}

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Jan 2018, 08:53 AM
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.
Tags
RichTextEditor
Asked by
Andreas
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or