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.