Skip navigation
smon_ed
Currently Being Moderated

Adding a TABSTOP character into a RichEditableText component

Feb 23, 2011 9:29 AM

I am placing html text, loaded from a database, into a RichEditableText component.

 

instance.textFlow = TextConverter.importToFlow(txtString, TextConverter.TEXT_FIELD_HTML_FORMAT);

 

The loaded text contains tab characters but they are not displaying.

 

I have tried to find a solution by saving my text to database with the tab characters replaced with a custom string like ~tab~

 

I then am using a search-and-replace function to replace all of the instances of ~tab~ with a tabstop character.

 

But I still can't get the character to display.  "\t" doesn't workand nor does anything else I have tried.

 

Any ideas what I can do to get the tabstops to display?  *confused*

 
Replies
  • Currently Being Moderated
    Feb 23, 2011 6:47 PM   in reply to smon_ed

    well you can use something

    like

    in this part of the code im looking for "$" and "," within my string.

    public var myPattern:RegExp = /[$,]/gi;

     

     

    then on you string you need to do something like this.

     

    mx.utils.StringUtil.trim(fields[0]).replace(myPattern,"");

    i'm replacing every occurrence with a blank. but you can replace your occurrences with "~tab~ " if thats what you wish to do.

    Hope this helps.

    Miguel

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2012 7:40 AM   in reply to smon_ed

    hello I have the same problem !

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points