Stylizing text .. inside a form?

  • genxservers
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 23, 2004
  • Posts: 30
  • Status: Offline

Post April 15th, 2004, 6:37 pm

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 15th, 2004, 6:37 pm

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post April 15th, 2004, 6:51 pm

Search for HTMLArea in yahoo or google, is the best solution I know about.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post April 15th, 2004, 7:32 pm

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.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • genxservers
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 23, 2004
  • Posts: 30
  • Status: Offline

Post April 15th, 2004, 7:55 pm

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
  • No Avatar
  • Joined: Feb 23, 2004
  • Posts: 30
  • Status: Offline

Post April 15th, 2004, 7:59 pm

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
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post April 16th, 2004, 11:12 am

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.
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post April 16th, 2004, 11:13 am

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

in my last post. DUH!
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.
  • genxservers
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 23, 2004
  • Posts: 30
  • Status: Offline

Post April 17th, 2004, 10:01 am

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
  • Joined: Mar 20, 2004
  • Posts: 401
  • Loc: Scorpion Hole
  • Status: Offline

Post April 17th, 2004, 5:31 pm

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: Kurthead+1 and 213 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.