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*
well you can use something
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.
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.
Thanks for the reply Miguel.
I have no problem with the search and replace. That's all working fine already.
The problem I am having is how to place a tabstop character into the RichEditableText component.
I am loading a string of html text into my application, replacing all occurrances of "~tab~" with a tabstop character "\t" and then placing the html text into the component textFlow using the code I posted above.
The problem is, I don't know how to get the tabstop character to display. "\t" doesn't work and just displays as a normal space.