Skip to main content
March 4, 2009
Answered

Insert text into a TextFlow

  • March 4, 2009
  • 2 replies
  • 1022 views
I am able to get text (all or part) out of an exisiting TextFlow using either TextFilter.export or textFlow.interactionManager.createTextScrap().

However, I can't seem to figure out how to insert text into a TextFlow (after the initial TextFilter.import). I see textFlow.interactionManager.pasteTextScrap(textScrap) but that requires use of the clipboard. If I use TextFilter.import, it replaces everything and it seems that I need to recreate all the ContainerController objects, etc. I see IEditManager has a replace function, but that doesn't really help me to append text or to replace all the text with new text. I assume I am just missing something obvious.
This topic has been closed for replies.
Correct answer tpf70
You arent missing anything obvious. There really isnt anything native in TLF to do what you are looking for. I had the same question a while back, and came to the conclusion that it was something that I had to roll my own solution.
Check out this thread.
Previous Thread for injecting text into a flow

2 replies

Participant
November 16, 2009

I use:

EditManager(textFlow.interactionManager).insertText("abcdefg");

That works for me.

tpf70Correct answer
Inspiring
March 5, 2009
You arent missing anything obvious. There really isnt anything native in TLF to do what you are looking for. I had the same question a while back, and came to the conclusion that it was something that I had to roll my own solution.
Check out this thread.
Previous Thread for injecting text into a flow
November 13, 2009

Hi tpf70,

I am also looking for the same solution. But I think this link is broken. Can you please help me out to overcome this problem.

Thanks in advance.