Answered
How to dynamically add new FlowElement to existing TextFlow via TLF markup
Is there a way to create a new FlowElement (such as a
DivElement) from markup text without having to go through the
TextFilter.importToFlow function?
What I am trying to accomplish is this:
I have a TextFlow already built.
I receive some text that I want to inject into the TextFlow as a new element somewhere in the existing TextFlow.
The method that I am using to accomplish this is, to create a second TextFlow from the markup via the importToFlow Function. Then I get the element from the second flow and make a deepCopy of it into a new "unowned" element. Lastly, I use this new "unowned" element in my main code by adding it as a child of the original TextFlow.
My function that does this is attached.
Thanks.
Tim
What I am trying to accomplish is this:
I have a TextFlow already built.
I receive some text that I want to inject into the TextFlow as a new element somewhere in the existing TextFlow.
The method that I am using to accomplish this is, to create a second TextFlow from the markup via the importToFlow Function. Then I get the element from the second flow and make a deepCopy of it into a new "unowned" element. Lastly, I use this new "unowned" element in my main code by adding it as a child of the original TextFlow.
My function that does this is attached.
Thanks.
Tim
