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;"/>
  • 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 Feb 18 '16 at 9:42
  • Yes tried that, did not help. Also tried to make the width as 100% – chinmay bhusari Feb 18 '16 at 9:45
  • Here is a link to the earlier question raised :salesforce.stackexchange.com/questions/21371/… – chinmay bhusari Feb 18 '16 at 9:47
  • Still looks the same – chinmay bhusari Feb 18 '16 at 9:52
  • 2
    have you tried rows attribute? – Venky Feb 18 '16 at 9:53
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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.