[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 777
  • Last Modified:

textarea with jsp

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=strContent.replaceAll("</B2>","</FONT>");
                    %>
                          <%= strContent %>
                    </textarea>


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

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.
0
ultraman7719
Asked:
ultraman7719
2 Solutions
 
fargoCommented:
for the given text, i don't see B1 or B2 in your strContent. What r u replacing then?
0
 
ManishLeadCommented:
Also I think in textarea it is not possible to show bold text.
You need rich text editor.

Karan
0
 
ultraman7719Author Commented:
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
TimYatesCommented:
karanw is right.

you need something like this: http://www.dynarch.com/projects/htmlarea/
0
 
ultraman7719Author Commented:
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">
tinyMCE.init({
      
      theme : "simple",
      valid_elements : "strong/b*[*]",
      mode : "textareas"
      

});
</script>

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?
0
 
ultraman7719Author Commented:
fargo, tim, karan, have you guys used this tinyMCE before?
0
 
ManishLeadCommented:
no.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now