0

I'm trying to paste text into a flex textarea. The text I'm pasting has newlines and tabs, but when I paste the text into the textarea, the tabs are stripped out.

If I comment out the CSS line font-family: EmbArial; the tabs will be preserved. I tried using different font files, but it didn't help.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Style>
        Application
        {
            /*font-family: EmbArial; /*remove comment to show problem*/
        }
        @font-face
        {
            font-family: "EmbArial";
            src: url("fonts/BKANT.TTF");
        }
    </mx:Style>
    <mx:TextArea id="textStuff" width="300" height="100" text="Paste stuff with tabs!"/>
</mx:Application>

Full source here: johnuckele.com/TabProblem.zip

Any ideas?

scott
  • 1
  • 1
  • 3
  • My first thought is that the tab character is not part of the character set of your font. What happens if you embed a some standard font, such as Arial or Times? – Wade Mueller Oct 26 '10 at 21:05
  • I was originally using standard Arial and it didn't work, so I tested it with some other font sets. Still nothing. – scott Oct 27 '10 at 13:08

1 Answers1

0

Sounds like the text you try to paste uses an ecoding for the tab which your fonts don't understand.

Kev
  • 118,037
  • 53
  • 300
  • 385
Czar
  • 356
  • 1
  • 4
  • 21
  • 1
    Turns out this is a Flex problem. If you check out http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html and try to paste some text with tabs into their examples, the problem still occurs. – scott Nov 05 '10 at 13:09