Results 1 to 3 of 3

Thread: RTF or HTML in textarea?

  1. #1
    Join Date
    Jan 2006

    Question RTF or HTML in textarea?

    hi. I was wondering if anyone can show me a quick example of formatting the text in the textarea, or how to use RTF. I've had a brief look at mshtml and midas (and also some other premade ones like fck), but I was wondering if there's a simple, single code that will run on all browsers?

    Currently, what I need is to be able to format the textarea at the clientside. So once I've got the hang of it, I should be able to write the javascripts to add functionalities to it. But first, I'm gonna need a quick example, perhaps something like:

    test <b>text</b> <font color=red>1</font> <u>2</u> 3 
    The reason I've decided to start from scratch is because I want full control over the code that I've created, such as how to code is (pre? post?)parsed, etc. Also, I want to learn too, instead of using what other people have already created. That's why I'm trying to go for the lowest denominator, the most primitive way, and slowly build myself up.


  2. #2
    Join Date
    Aug 2004
    Is this textarea part of a form to be submitted by the user, or are you just looking for a way to have text in a scrollable box? If the latter, use a DIV instead of TEXTAREA and format it with CSS to set the dimensions along with "overflow: auto" so that a scrollbar is provided if needed.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Jan 2006
    hi, and thanks for the reply. Anyway, I want to provide a textarea that a user can type in, like the ones one would find at blogs or webmails. So in a nutshell, I want to create a form element where a user can type documents that are not only plain text, but rich text as well.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center