Skip to main content
Known Participant
February 2, 2011
Question

Can't insert text after span (TLF 2 with Flex 4.1)

  • February 2, 2011
  • 2 replies
  • 954 views

It seems there's a bug, I reported it at

http://bugs.adobe.com/jira/browse/SDK-29368

(I wasn't able to specify "TLF" in the "Components" dropdown, that's why I'm posting the bug report URL here in the TLF forum.)

Tobi

This topic has been closed for replies.

2 replies

Bill_Sahlas
Participating Frequently
February 4, 2011

The bug is now closed and is marked as not a bug - http://bugs.adobe.com/jira/browse/SDK-29368  It is necessary to set  XML.ignoreWhitespace=false

Adobe Employee
February 3, 2011

I think the problem may be the "ignoreWhitespace" flag in the XML object is set to true. Try setting it to false, it should fix your problem. ignoreWhitespace causes leading and trailing spaces to be removed from the elements.

- robin

tobi3Author
Known Participant
February 3, 2011

Thanks for the reply, Robin.

I added XML.ignoreWhitespace = false .

But here's the problem:

Delete all characters after the text portion that has a black background.

Now try to insert text after that black region.

This currently is impossible.

Instead, the inserted text gets appended to the black portion of text.

I guess a solution would require the cursor to have one possible position inside the span and a second possible position right outside of the span.

Adobe Employee
February 3, 2011

Yes, we considered that. But we thought it would be confusing since we didn't know of any other text editors that do that. You can use the EditManager.applyFormat to change the format of the cursor position to have a different color, which will force the next inserted to have the new color.

- robin