WPCubed Product Support

Is there a way to get the Selected text in a WPRichText?

Hi, I have a WPRichText with a long text inside it, I want to be able to manually (using the mouse or shift key keyboard) select a piece of the text, and do somethings with this selected text, but I can't seen to find a way to work with the selected text.

For example, let's say I have this on my WPRichText:

"This is just an example of a long text with a piece of the text selected"

Let's say I selected the bold part with the mouse, or using shift + left/right key, how do I get this selected text?

Something like Showmessage(WPRichText.SelectedText), and it will show a dialog with "example of a long text"?

Also I want to get the text without any rtf code, just the pure text.. I'll use the selected text to insert data into a table!

Thanks!

#1 ♥ 0
4.3k Views 1 users read 1 min

Couldnt be easier lol

WPRichText.SelText;

I was looking for SelectedText, damn that short names 😃

#2 ♥ 0
This category is archived. No new posts are possible.