Stylizing text .. inside a form?

  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

This forum seems to be good for Javascript question, so I'll try my luck here with another one.

I want to be able to stylize text inside a <textarea> tag.

Like how Yahoo! mail have little buttons that you can click and it would change ur font to bold right away and u can see it if u type something.

Not add a "< b >" tag infront of the text.

I have searched a few forums for this, and the general answer seems to be you cant stylize text in textarea. But since I have seen it done 1000x times by sites such as Yahoo!, Xanga, I know its possible.

Can anyone help?

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

Search for HTMLArea in yahoo or google, is the best solution I know about.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well, text can be "stylized" in text areas via CSS as I did here:
http://cigloans.com/apply.html

But that doesn't appear to be what you are looking for. If I understand what you are askig, you seem to be looking for a WYSIWYG type text box where the user sees the end result as they type the post.

I haven't a clue how to do that, but I just wanted to clarify it for others because I think that's what you're asking for.
  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

yeah .. I think you put it in much better word than I did Atno. Thats what I am looking for.

a WYSIWYG type text box where users see the end result as they type the post, not the actually code.
  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

And LEO, great link. I am still reading through the code to see if i can apply that to my system, but thanks alot, that helps a bunch.
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

I know "what you mean" has been scrutinized ad nauseum. But, I think what I've got to say is sort of pseudo code a solution.

Basically what I think you need is for a button in the window to call a javascript function that will add text properties (ie <b>) to the user's input. To do that wouldn't be all that hard. You'd capture the user's input and turn it into a string. Add the desired text property (<b>) to the string, and write it back to the <textarea>

I mean maybe I oversimplified it. Maybe I'm just missing the point. But, it seems to me that that would work.
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Feeling like an idiot b/c I didn't use the
Code: [ Select ]

in my last post. DUH!
  • genxservers
  • Novice
  • Novice
  • genxservers
  • Posts: 30

Post 3+ Months Ago

Thanks for everyone's help. What I ended up doing was intergrating HTMLArea into my code.

That seems to be a great system as is so I didnt want to reinvent the wheel while I am not even sure I can do close to as good a job.

Best of all, HTMLArea is free too.
  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

That HTMLArea is pretty nice, except it only works for IE. What about those who use Mozilla or maybe another browser like myself. There are a lot of users who are switching over to Mozilla and you can't forget about them.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 117 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.