2

I know this question has been asked earlier. but did not see proper responses so asking again.

<apex:pageBlockSection title="Preview Pane" columns="1">
    <apex:inputTextarea richtext="true" id="EmailBody" label="EmailBody"  
         cols="1" ondblclick="false" disabled="false" 
         value="{!emailTemplateSelected.htmlValue}"/>
</apex:pageBlockSection>

I have tried to set the column value for the pageblock section. As well as for the inputtextarea. Still the column width dose not span the entire page.

The lines on the side denote the end of page

<apex:inputTextarea richtext="true" id="EmailBody" label="EmailBody" cols="1" 
   ondblclick="false" disabled="false" value="{!emailTemplateSelected.htmlValue}" 
   style="height:200px;width:200px;"/>
9
  • 1
    Have you tried <apex:inputTextarea richtext="true" id="EmailBody" label="EmailBody" cols="1" ondblclick="false" disabled="false" value="{!emailTemplateSelected.htmlValue}" style="height:200px;width:200px;"/> ? is it working ?
    – Ratan Paul
    Commented Feb 18, 2016 at 9:42
  • Yes tried that, did not help. Also tried to make the width as 100% Commented Feb 18, 2016 at 9:45
  • Here is a link to the earlier question raised :salesforce.stackexchange.com/questions/21371/… Commented Feb 18, 2016 at 9:47
  • Still looks the same Commented Feb 18, 2016 at 9:52
  • 2
    have you tried rows attribute?
    – Venky
    Commented Feb 18, 2016 at 9:53

1 Answer 1

2

Use the inputtextarea outside of pageblocksection. It should only be nested by pageblock.

Use row and cols attribute of apex:inputTextarea

<apex:inputTextarea richtext="true" id="EmailBody" label="EmailBody" cols="1" 
      ondblclick="false" disabled="false" 
      value="{!emailTemplateSelected.htmlValue}" row="100"/>

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputTextarea.htm

According to the doc

"rows" : "Integer" : The height of the text area, as expressed by the number of rows that can display at a time.

"cols": "Integer" : The width of the field, as expressed by the number of characters that can display in a single row at a time.

And additionally make sure there is enough room for it to expand. So when you are marking pageBlocksection as columns="4" you are essentially dividing it into 4 parts and each component you add there takes a part of it.

enter image description here

7
  • Ratan i need the width of the input rich text area to span the entire page. Any suggestions on that ? Commented Feb 18, 2016 at 10:03
  • @chinmaybhusari change col use or cols="100" or something based on your required
    – Ratan Paul
    Commented Feb 18, 2016 at 10:05
  • @chinmaybhusari some time cols will not because of its parent element will not give proper space.
    – Ratan Paul
    Commented Feb 18, 2016 at 10:13
  • but the parent in this case has been set to column width "1" . So where is it going wrong ? Commented Feb 18, 2016 at 10:17
  • 1
    Yes that worked !!! Awesome. Thanks a lot for your help.I cannot thank you enough. Commented Feb 18, 2016 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .