cancel
Showing results for 
Search instead for 
Did you mean: 

Can I insert a new text at the cursor's position In Formatted-Text-Edit?

Former Member
0 Kudos

Hi Everyone,

I am doing a task to enhance Formatted-Text-Edit,

The task's goal is: simultaneously edit/display text and image.

I decide to use Formatted-Text-Edit and Formatted-Text-View to realize the task.

In Formatted-Text-Edit, user can edit the text and input URL for image,

In Formatted-Text-View, the text and image can be displayed simultaneously.

I add a button "Insert Image" besides the Formatted-Text-Edit,

This is the key point:

When user click the button, I want to insert a new text(URL of the image) at the cursor's position in Formatted-Text-Edit,

But how can I get the cursor's position, and insert a new text at the cursor's position in FTE.

Can anyone give me some suggestion or solution?

Many thanks in advance.

Best Regards,

Derek

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't believe that you can get the cursor position yet with the FormattedTextEdit UI element. The best you could do currently is to place the insert at the end of the current text.

Note duplicate thread/question to;

Please don't double post your questions in the forum.