How to use <b> <i> <u> <p> in textarea

Discussion in 'HTML & Website Design' started by jkgiven, Apr 7, 2007.

  1. #1
    How can I offer the Bold, Italics, Underline, etc. options within my textarea? Like on this page. Also a blank line interpreted to be a new paragraph, and not just added to the end of the previous line of text?

    I looked at the code of this page and found vB_Editor_001_cmd_bold but I don't know vB. Can somebody please point me in the right direction.
     
    jkgiven, Apr 7, 2007 IP
  2. qlWebDirectory

    qlWebDirectory Banned

    Messages:
    23
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you try w3schools.com or htmldog.com? In search box type textarea and you shoud be redirected to a page that provides information and answer to your problem. If I read your post correctly you are concern about vB. This stands for vBulletin which is script that is used by this forum. If you have any more problems PM me and I will try to help you.
     
    qlWebDirectory, Apr 8, 2007 IP
  3. I-Got-IT!

    I-Got-IT! Peon

    Messages:
    92
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    create a .textarea style in your CSS, you can change the font type, style and everything. =)
     
    I-Got-IT!, Apr 8, 2007 IP
  4. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can put all tags in a text form then use php in your submit button.

    i.e

    echo "This is <b>bold</b>. This is <i>italicized</i>.";
    PHP:
     
    boyponga, Apr 9, 2007 IP
  5. jkgiven

    jkgiven Guest

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes, I know that I can type in <b></b> or <i></i> etc. but my visitors don't know html tags. Thus I want a simple button - like what is used to control the textbox I typed this message into. When you click on the "B" for example it automatically puts in with the mouse focus between them.

    I'll try searching for this, but most things I find on textarea, just tell me how to create a textarea, not add the above stuff to it.

    I want...
    <b> <i> <u> tags
    as well as the ability to add a weblink
    and if line is left blank, it should be interpreted as a <p>

    Just the way this textare (used to type in this message) works.
     
    jkgiven, Apr 9, 2007 IP
  6. Rasczak

    Rasczak Peon

    Messages:
    131
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    just make some alternatives like in this forum - [*B*] for bold, etc - and then parse and str_replace it for real html tags :)
     
    Rasczak, Apr 9, 2007 IP
  7. D_C

    D_C Well-Known Member

    Messages:
    1,107
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    160
    #7
    Have the input thing become a variable once they submit it. Then have php take the var and echo it out onto the page. That seems to make sense to me off the top of my head.
     
    D_C, Apr 9, 2007 IP
  8. Louis11

    Louis11 Active Member

    Messages:
    783
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #8
    You're going to need to do two things:

    1) For the Button (bold button) you're gonna need to manipulate the textarea with javascript or some other sort of scripting language

    2) Use PHP or to analyze the code if you're inserting based on BB code or something along those lines.
     
    Louis11, Apr 9, 2007 IP