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
Rick MacGuiganRick MacGuigan 

rerender rich text field solutions

For 2017 what is the recommended solution to rerendering visualforce pages with rich text fields ? Below is a sample tab panel where the second tab (TEST2) contains a rich text field. This results in the VF error:
Visualforce Error
Rerender is not currently supported with rich text editing enabled 

 
<apex:page standardStylesheets="true" standardController="Account_Summary__c" readOnly="false"  showHeader="true"  >

<apex:form id="form1">
<apex:pageBlock id="block1"  >
<apex:actionRegion > 

<apex:pageBlockSection columns="1" id="section1" title="General Information" showHeader="true" >

    <apex:inputField value="{!Account_Summary__c.Lines_of_Business__c}" style="color:blue;" >
        <apex:actionSupport event="onchange" reRender="taboutputpanel,theTabPanel,tab1a,tab1b,tab1c" /> 
        
        </apex:inputField>          
    
</apex:pageBlockSection>


<apex:actionRegion immediate="true" >   
<apex:outputPanel >
<b><apex:outputText style="font-style:bold;color:blue" value="Line of Business Analysis" /></b>

<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">

<apex:tab label="TEST1" name="tab1a" id="tab1a" rendered="{!IF(CONTAINS(Account_Summary__c.Lines_of_Business__c,'WC'),"true","false")}"  > </apex:tab>
<apex:tab label="TEST2" name="tab1c" id="tab1c" rendered="{!IF(CONTAINS(Account_Summary__c.Lines_of_Business__c,'Personal Auto'),"true","false")}"  > 
    <apex:inputField value="{!Account_Summary__c.WC_Outside_sources_UW_information__c}" />
</apex:tab>

</apex:tabPanel>
</apex:outputPanel>
</apex:actionRegion>


</apex:actionRegion>

</apex:pageBlock>
</apex:form>
</apex:page>

 
Rick MacGuiganRick MacGuigan
Thanks for the response Rahul. 

I implemented the ckeditor approach but I only see a input text area with rich text controls off when added to a tab. Any ideas as I don't see where the ckeditor script is benefitting anything better than just using a inputTextArea tag with rich text off ?

I added this line before the tabpanel and inside the tab panel. On the picture you can see that the editor is different outside or inside the tab.  
 
<apex:inputtextarea styleClass="ckeditor" richtext="false" value="{!Account_Summary__c.WC_Outside_sources_UW_information__c}" />

<apex:page standardStylesheets="true" standardController="Account_Summary__c" readOnly="false"  showHeader="true"  >

<apex:includescript value="{!URLFOR($Resource.CkEditor, 'ckeditor/ckeditor.js')}" />
<script type="text/javascript">
   function ReloadCKEditor() {
   alert("Hi");
   for(name in CKEDITOR.instances)
   {
       delete CKEDITOR.instances[name];
   }
   CKEDITOR.replaceAll();
}
</script>

<apex:form id="form1">
<apex:pageBlock id="block1"  >
<apex:actionRegion > 

<apex:pageBlockSection columns="1" id="section1" title="General Information" showHeader="true" >

    <apex:inputField value="{!Account_Summary__c.Lines_of_Business__c}" style="color:blue;" >
        <apex:actionSupport event="onchange" reRender="taboutputpanel,theTabPanel,tab1a,tab1b,tab1c" oncomplete="ReloadCkEditor();" />        
        </apex:inputField>          
    
</apex:pageBlockSection>

    <apex:inputtextarea styleClass="ckeditor" richtext="false" value="{!Account_Summary__c.WC_Outside_sources_UW_information__c}" />  

<apex:actionRegion immediate="true" >   
<apex:outputPanel >
<b><apex:outputText style="font-style:bold;color:blue" value="Line of Business Analysis" /></b>

<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
<apex:tab label="TEST1" name="tab1a" id="tab1a" rendered="{!IF(CONTAINS(Account_Summary__c.Lines_of_Business__c,'WC'),"true","false")}"  > </apex:tab>
<apex:tab label="TEST2" name="tab1c" id="tab1c" rendered="{!IF(CONTAINS(Account_Summary__c.Lines_of_Business__c,'Personal Auto'),"true","false")}"  >
    <apex:inputtextarea styleClass="ckeditor" richtext="false" value="{!Account_Summary__c.WC_Outside_sources_UW_information__c}" />
</apex:tab>
<apex:tab label="TEST3" name="tab3c" id="tab3c" > </apex:tab>
<apex:tab label="TEST4" name="tab4c" id="tab4c" > </apex:tab>

</apex:tabPanel>
</apex:outputPanel>
</apex:actionRegion>


</apex:actionRegion>

</apex:pageBlock>
</apex:form>
</apex:page>

 User-added image