html in textarea

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • megha

    html in textarea

    Hi all

    I am adding signature in textarea which is stored as text in database
    now if i add html tags to it and later retrieve it in textarea it
    shows all tags of html but not their function. How i can get proper
    signature with html function.
  • Herman Timmermans

    #2
    Re: html in textarea

    megha wrote:
    [color=blue]
    > Hi all
    >
    > I am adding signature in textarea which is stored as text in database
    > now if i add html tags to it and later retrieve it in textarea it
    > shows all tags of html but not their function. How i can get proper
    > signature with html function.[/color]

    You should not use a JTextArea for that, but instead use a JEditorPane or
    JTextPane for this.
    Brgds, Herman
    --
    Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
    Anti Spam = remove the "dot" and the "at"
    Registered Linux User #264690
    Visit us : http://users.skynet.be/herman.timmermans

    Comment

    • megha

      #3
      Re: html in textarea

      I am not using any of this infact it is a plane textarea of html in
      jsp file but is not doing the proper functioning please advice.

      Thanks




      Herman Timmermans <timmermansdot. hermanat@skynet .be> wrote in message news:<406a7f19$ 0$2071$ba620e4c @news.skynet.be >...[color=blue]
      > megha wrote:
      >[color=green]
      > > Hi all
      > >
      > > I am adding signature in textarea which is stored as text in database
      > > now if i add html tags to it and later retrieve it in textarea it
      > > shows all tags of html but not their function. How i can get proper
      > > signature with html function.[/color]
      >
      > You should not use a JTextArea for that, but instead use a JEditorPane or
      > JTextPane for this.
      > Brgds, Herman[/color]

      Comment

      • Herman Timmermans

        #4
        Re: html in textarea

        megha wrote:
        [color=blue]
        > I am not using any of this infact it is a plane textarea of html in
        > jsp file but is not doing the proper functioning please advice.
        >
        > Thanks
        >
        >
        >
        >
        > Herman Timmermans <timmermansdot. hermanat@skynet .be> wrote in message
        > news:<406a7f19$ 0$2071$ba620e4c @news.skynet.be >...[color=green]
        >> megha wrote:
        >>[color=darkred]
        >> > Hi all
        >> >
        >> > I am adding signature in textarea which is stored as text in database
        >> > now if i add html tags to it and later retrieve it in textarea it
        >> > shows all tags of html but not their function. How i can get proper
        >> > signature with html function.[/color]
        >>
        >> You should not use a JTextArea for that, but instead use a JEditorPane or
        >> JTextPane for this.
        >> Brgds, Herman[/color][/color]

        Maybe you should be a little more precise and clear in stating your problem.
        Maybe you can post the source code of the JSP and post as well the signature
        you want to display ?
        Herman
        --
        Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
        Anti Spam = remove the "dot" and the "at"
        Registered Linux User #264690
        Visit us : http://users.skynet.be/herman.timmermans

        Comment

        • news.skynet.be

          #5
          Re: html in textarea

          An html textarea tag will not render html.. it will only show text, so your
          html will not be rendered in the text area, it is not designed for that.

          What you could do is a preview pane with a div tag and use javascript on the
          client side to populate the div tag using the innerHTML property of a div.
          This would then render the html. Or display the html in any other way... it
          won't be rendered in a textarea, as far as I know.

          hope this helps

          cheers
          Martin

          --

          ---------------
          http://www.nonstoploop.co.uk/ - dynamic websites
          http://www.rossanobacchin.be/ - fine art
          http://www.weycameras.co.uk/ - photographic supplies
          ---------------

          "megha" <megha@4cplus.c om> wrote in message
          news:eeb80314.0 403302328.a29c3 0b@posting.goog le.com...[color=blue]
          > Hi all
          >
          > I am adding signature in textarea which is stored as text in database
          > now if i add html tags to it and later retrieve it in textarea it
          > shows all tags of html but not their function. How i can get proper
          > signature with html function.[/color]


          Comment

          Working...