textarea with jsp

Posted on 2006-05-22
Last Modified: 2008-02-01
hi there, i have this data, as from the database.

<B>xxx</B> <B>resume</B> <B>artemis</B> <B>apollo</B> <B>license</B> <B>key</B> <B>copyright</B> <B>war</B> <B>legal</B>   all above are keywords.. did  caught all !!!

i need to put this as a value within my textarea, with this,
                    <textarea name="textfield" cols="57" rows="10" >
                            String strContent = yo.getVN_022();
                                    strContent = sp.forAttachments(strContent);
                                    strContent=strContent.replaceAll("B1>", "B>");
                                    strContent=strContent.replaceAll("<B2>","<FONT style=\"BACKGROUND-COLOR: yellow\">");
                          <%= strContent %>

Yet, when it's come out, it's become exactly like what database stores. If i do like this,
                        <td>      <%= strContent %>

It'll automaticallly make certain text to be <b> bold in display.

Thus, any ideas how can i make the character in bold color? I have tried the RicjText Editor.. dont know why it's niot working. please help.
Question by:ultraman7719
    LVL 11

    Expert Comment

    for the given text, i don't see B1 or B2 in your strContent. What r u replacing then?
    LVL 11

    Accepted Solution

    Also I think in textarea it is not possible to show bold text.
    You need rich text editor.


    Author Comment

    fargo, this is the contain

    <B>xxx</B> <B>resume</B> <B>artemis</B> <B>apollo</B> <B>license</B> <B>key</B> <B>copyright</B> <B>war</B> <B>legal</B>   all above are keywords.. did  caught all !!!

    and it's same with strContent
    LVL 35

    Assisted Solution

    karanw is right.

    you need something like this:

    Author Comment

    thanks guys.. i am now using the tinyMCE.. anyone use this b4? i stuck in the documentation where by i cant show my <b> character no matter how...

    <script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
          theme : "simple",
          valid_elements : "strong/b*[*]",
          mode : "textareas"


    this is my words...
    this is <b> testing </b> for my text editor adivce by <u> experts </u>

    but when its shown, its didn't get formatted.... any ideas?

    Author Comment

    fargo, tim, karan, have you guys used this tinyMCE before?
    LVL 11

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now