function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vijaya kudupudivijaya kudupudi 

how make some lines of text as bold in textarea in vf page?

Hi,

 I have used html <textarea> tag. I want to show some lines of text as bold in vf page. Please any one can give help.
Best Answer chosen by vijaya kudupudi
Antonio ManenteAntonio Manente
Yes, you are correct. It slipped my mind that you cannot use html elements in a text area without some external plugin (i.g. jQuery). I don't know if it'll satisfy your requirements but I'd recommend using.
<div contenteditable="true"></div>
That will allow you to use it almost as a textarea, and it will evaluate your <b></b> tags or any other html you'd like to use

All Answers

Antonio ManenteAntonio Manente
Maybe be a little more specific so we can identify your use case. If CSS isn't an option, maybe html's <b></b> tags will help? The question is a bit too broad to provide a good answer.
vijaya kudupudivijaya kudupudi
I tried <b></b> tag inside that textarea. And I have tried CSS style also but I didn't get solution.I am attachanging my code bellow.
<apex:page controller="RadioButton">
<apex:form id="form1">
 <textarea cols="50" rows="5" escape="false">
       <b>BUSINESS TERMS AND CONDTIONS:</b><br/>
       1.Many types of website will need specialised terms and conditions <br/>to ensure legal compliance and adequate management of legal risks. In addition to this generic template, we supply a wide range of more specific website terms of use templates.
               
       </textarea>
            
  </apex:form>
</apex:page>

 
Antonio ManenteAntonio Manente
Yes, you are correct. It slipped my mind that you cannot use html elements in a text area without some external plugin (i.g. jQuery). I don't know if it'll satisfy your requirements but I'd recommend using.
<div contenteditable="true"></div>
That will allow you to use it almost as a textarea, and it will evaluate your <b></b> tags or any other html you'd like to use
This was selected as the best answer
vijaya kudupudivijaya kudupudi
Thank you. It's working for me.