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
trishtrish 

apex:inputTextArea , changing the height when richtext =true

I am using the <apex:inputTextArea> component with richtext = true. When this attribute is set to true, the height of the textarea seems to be fixed. How can I change the height?
TehNrdTehNrd
Try forcing height with styles.

style="height: 500px"
trishtrish
I've already tried doing it. The style attribute does not seem to have an effect.
behrlichbehrlich
Unfortunately I cannot adjust the height using either the rows or style attribute.  Ron Hess posted an example here but it doesn't seem to work any longer. There is a tutorial which shows you how to integrate the YUI Rich Text Editor. It's somewhat dated but may help.

Good luck

Jeff Douglas
Informa Plc
blog.jeffdouglas.com
TehNrdTehNrd
I am now hitting this same problem. Did anyone find a solution?
TehNrdTehNrd

I was able to come up with a solution using some simple javascript. The rich text editor is located in an iframe and we need to adjust the height of this iframe. We can do this with javascript but it we must wait a little bit before doing this as we must wait for the ifram to load.

 

//This is the normal field but if richText is set to true it is not rendered.
<apex:inputTextArea value="{!ADP__c.Strengths__c}" richText="true" rows="200" id="sInput"/>

//The id here is actually the id of the Iframe, not the inputText above. Use a program like firebug to identify this id. The script waits half a second to ensure the iframe has loaded before trying to adjust the height.
<script type="text/javascript">
setTimeout("document.getElementById('page:form:sInput___Frame').style.height = '500px'",500);
</script>

 

Unfortunelty this won't help me as I just found out richText input fields are not compatible with rerenders.

 

-Jason

 

 

Message Edited by TehNrd on 08-31-2009 11:26 AM
deepakMdeepakM

just put the section in table like below

 

<table style="float:left;width:1300px;margin-left:55px;">
<tr>
<td>
<apex:pageBlockSection columns="1">
<apex:inputTextarea label="Email Content" richText="true" rows="20" />
</apex:pageBlockSection>
</td>
</tr>
</table>

 

this way you can set the height

neeedhelpneeedhelp

But richtext can't be used with rerenders......... How can we get out of this..........