Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Text area formatting

I am wondering if there is an easy way to allow custom text formatting. Maybe something similar to Pages where you can change, anywhere in the text the style of the font/color/whatever. Is this possible with a textarea? Should I create a label every time they type a letter or something? Or should I just go the webview route? thanks.

— asked April 30th 2010 by Tyler Johnson
  • area
  • color
  • font
  • format
  • formatting
  • iphone
  • mobile
  • text
  • textarea
  • webview
0 Comments

3 Answers

  • Accepted Answer

    Sadly webview only.

    — answered April 30th 2010 by Dan Tamas
    permalink
    0 Comments
  • The problem with the font tag is that it will format the entire textarea together, not just parts…

    — answered May 1st 2010 by Tyler Johnson
    permalink
    0 Comments
  • Use the font tag and put your styling attributes in {} braces (or are they brackets?).

    For example:

    font: {fontSize: 18, fontWeight: 'bold'}

    I'm not sure what properties are available, but is is how you do it.

    — answered May 1st 2010 by Alexander Stone
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.