5 Replies Latest reply on Apr 10, 2009 3:06 PM by spugalia

    Not able to add text to RichTextEditor after changing font

    spugalia

      hi

       

      I am using a RichTextEditor control in my application to type htmltext. I am getting the following issue:

       

      1. I typed text in Editor with font style = "-serif"

      2. In middle we change the font to style ="-sans"

      3. now i click again in textarea

      4. I tried typing but I was not able to do that. Further typing of text is not possible

       

      I am using richtexteditor as follows:

                  <mx:FormItem >
                      <mx:RichTextEditor id="txt_charity_pod_msg"  title="Pod Charity Small Information:" borderStyle="solid" width="100%">
                      </mx:RichTextEditor>
                  </mx:FormItem>  

       

      Can you please let me know why it is behaving like this? Am I missing anything?

       

      Thanks

      Shaily

        • 1. Re: Not able to add text to RichTextEditor after changing font
          Brent Lamborn Level 2

          I believe the RichTextEditor uses system fonts. It sounds like your system is missing a font. Perhaps your system's default sans font? Like on Windows XP it is MS Sans Serif. What if you publish your app to a different machine. Does it work then?

           

          If worse comes to worse, you coudl remove the font that isn't working from the list. Check here for some more info:

           

          http://blog.flexexamples.com/2007/11/23/populating-the-nested-font-family-combobox-control -in-a-flex-richtexteditor-control/

           

          Some of the comments in that post might help as well.

          • 2. Re: Not able to add text to RichTextEditor after changing font
            spugalia Level 1

            hi

             

            I do not think the issue is as above, because this is happening with every font (Arial, Verdana, Times). So if you change the font in RichTextEditor and then try to type something in the textarea, it will not allow you to type. Please let me know if this is known bug or if I am missing something.

            • 3. Re: Not able to add text to RichTextEditor after changing font
              Brent Lamborn Level 2

              Hmm. Can you post more of your code?  Does the problem still occur if you create a new flex app with only a RichTextEditor in it?

               

              There is no bug that I am aware of. We use RTE quite a bit in our apps and haven't had that issue.

              • 4. Re: Not able to add text to RichTextEditor after changing font
                spugalia Level 1

                Even I am not able to italicize the words. If I select the text in RTE and press I, the text do not get italicize

                 

                I am posting my mxml. I am using FlexBuilder 3 and sdk 3.2

                 

                Thanks

                Shaily

                • 5. Re: Not able to add text to RichTextEditor after changing font
                  spugalia Level 1

                  <?xml version="1.0" encoding="utf-8"?>
                  <PodContentBase
                       xmlns="com.esria.samples.dashboard.view.*"
                       xmlns:mx="http://www.adobe.com/2006/mxml"
                       width="100%" height="100%" creationComplete="init()" >


                          
                  <mx:WebService id="charityMasterService" wsdl="http://{TestLoginIntegration.GetServerAddress()}/UserService/CharityMasterService.asmx?WSDL" showBusyCursor="true">               
                       <mx:operation name="CreateCharity" result="fn_ResultHandler_CreateCharityMasterService(event)"/>
                       <mx:operation name="GetListOfCharityMaster" result="fn_ResultHandler_GetListOfCharityMaster(event)"/>
                       <mx:operation name="ModifyCharity" result="fn_ResultHandler_ModifyCharityMasterService(event)"/>
                       <mx:operation name="DeleteCharity" result="fn_ResultHandler_DeleteCharity(event)"/>               
                  </mx:WebService>


                       <mx:ViewStack id="Navigation_Viewstack"  width="100%" height="30" creationPolicy="all" >
                                       <mx:HBox id="UpdateRecord_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                           verticalAlign="middle">
                                           <mx:HBox >
                                               <mx:Label text="Profile Name:"  fontSize="10" fontWeight="bold" width="100"/>
                                               <mx:Text id="id_profile_name" text=""  fontSize="10" fontWeight="bold" width="370"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>
                                           <mx:Button label="Update - Not Implemented" click=""/>
                                           <mx:Button label="Reset" click="" />
                                           <mx:Button label="Return" click=""/>
                                           <mx:Spacer width="10"/>
                                       </mx:HBox>
                                       <mx:HBox id="Main_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                            verticalAlign="middle">
                                           <mx:HBox >
                                                 <mx:Label text="Search:" fontSize="10" themeColor="#577DC3" fontFamily="Verdana" width="104" fontWeight="bold"/>
                                                 <mx:TextInput width="368"   fontSize="10" height="20"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>
                                           <mx:Button label="Refresh" click=""/>
                                           <mx:Spacer width="10"/>
                                       </mx:HBox>       
                                       <mx:HBox id="Insert_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                            verticalAlign="middle">
                                           <mx:HBox >
                                                 <mx:Label text="Search:" fontSize="10" themeColor="#577DC3" fontFamily="Verdana" width="104" fontWeight="bold"/>
                                                 <mx:TextInput width="368"   fontSize="10" height="20"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>
                                           <mx:Button label="New Charity" click="bn_New_Click()"/>
                                           <mx:Button label="Delete" click="bn_Delete_Click()"/>
                                           <mx:Button id="bn_refresh_insert" label="Refresh" click="refresh_click()"/>
                                           <mx:Spacer width="10"/>
                                          
                                       </mx:HBox>
                                       <mx:HBox id="Next_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                            verticalAlign="middle">
                                           <mx:HBox >
                                                 <mx:Label text="Search:" fontSize="10" themeColor="#577DC3" fontFamily="Verdana" width="104" fontWeight="bold"/>
                                                 <mx:TextInput width="368"   fontSize="10" height="20"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>
                                          
                                           <mx:Button label="Next" click="bn_Next_Click()"/>
                                           <mx:Button label="Return" click="bn_Return_Click()"/>
                                           <mx:Spacer width="10"/>
                                          
                                       </mx:HBox>   
                                       <mx:HBox id="Last_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                            verticalAlign="middle">
                                           <mx:HBox >
                                                 <mx:Label text="Search:" fontSize="10" themeColor="#577DC3" fontFamily="Verdana" width="104" fontWeight="bold"/>
                                                 <mx:TextInput width="368"   fontSize="10" height="20"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>
                                                              
                                           <mx:Button label="Preview" click="preview_charity_detail_click()"/>
                                           <mx:Button label="Save" click="bn_Save_Click()"/>
                                           <mx:Button label="Return" click="bn_Return_Click()"/>
                                           <mx:Spacer width="10"/>                       
                                       </mx:HBox>   
                                      
                                   <mx:HBox id="Preview_Pod_Navigation"
                                           width="100%"
                                           horizontalAlign="right"
                                            verticalAlign="middle">
                                           <mx:HBox >
                                                 <mx:Label text="Search:" fontSize="10" themeColor="#577DC3" fontFamily="Verdana" width="104" fontWeight="bold"/>
                                                 <mx:TextInput width="368"   fontSize="10" height="20"/>
                                           </mx:HBox>
                                           <mx:Spacer width="80%" minWidth="10"/>       
                                           <mx:Button label="Preview" click="preview_pod_click()"/>               
                                           <mx:Button label="Next" click="bn_Next_Click()"/>
                                           <mx:Button label="Return" click="bn_Return_Click()"/>
                                           <mx:Spacer width="10"/>
                                          
                                       </mx:HBox>                       
                                                                                                               
                                   </mx:ViewStack>

                  <mx:ProgressBar id="progressBar"  indeterminate="true" visible="false" height="1%" />
                  <mx:ViewStack id="viewStack" width="100%" height="100%" creationPolicy="all">

                  <mx:VBox id="charityList" verticalGap="0" width="100%" height="100%" >
                  <mx:DataGrid id="datagrid_CharityFeed"  width="100%" height="100%"  themeColor="#577DC3" fontFamily="Verdana" doubleClickEnabled="true" itemDoubleClick="fn_CharityFeedItemDoubleClick(event)" >

                                          <mx:columns>
                                              <mx:DataGridColumn dataField="charity_id"  visible="false" />
                                             <mx:DataGridColumn headerText="Charity Name" dataField="charity_name"/>                        
                                          </mx:columns>
                  </mx:DataGrid>              

                  </mx:VBox>


                  <mx:VBox id="podChairtyInfo" label="Pod Charity Information" width="50%" height="50%" borderStyle="solid">
                       <mx:Form   width="100%" height="100%" >
                       <mx:HBox width="100%" height="100%">
                           <mx:VBox width="50%" height="100%" borderStyle="solid">
                           <mx:FormItem label="Charity Name:" width="478" required="true">
                                   <mx:TextInput id="txt_charity_name"   borderStyle="solid" width="100%">
                                   </mx:TextInput>
                           </mx:FormItem>
                           <mx:FormItem label="Pod Charity Title:" width="478" required="true">
                                   <mx:TextInput id="txt_charity_pod_title"   borderStyle="solid" width="100%">
                                   </mx:TextInput>
                           </mx:FormItem>       
                           <mx:FormItem label="Pod Charity logo:" width="478">
                                   <mx:HBox>
                                   <mx:VBox width="200" height="48"     borderStyle="solid">   
                                   <mx:Image id="img_clogo" source="" width="189" height="39" />
                                   </mx:VBox>
                                   <mx:Button label="Browse" id="bn_logo_browse" click="bn_Browse_Logo_Click()"/>                       
                                   </mx:HBox>
                                  
                               </mx:FormItem>           
                           </mx:VBox>
                           <mx:VBox width="50%" height="100%" borderStyle="solid">
                               <mx:FormItem >
                                   <mx:RichTextEditor id="txt_charity_pod_msg"  title="Pod Charity Small Information:" borderStyle="solid" width="100%">
                                   </mx:RichTextEditor>
                               </mx:FormItem>       
                           </mx:VBox>
                          
                       </mx:HBox>


                           </mx:Form>   
                  </mx:VBox>   

                  <mx:HBox id="create_charity_banner" width="100%" height="100%" borderStyle="solid"  horizontalAlign="center">
                       <mx:VBox width="50%" height="50%"  borderStyle="solid">
                       <mx:Label text="Banner image:" />
                       <mx:HBox verticalAlign="middle"  width="100%" height="100%">
                       <mx:VBox width="100%" height="100%"     borderStyle="solid"  >
                       <mx:Image id="img_banner" source="" width="90%" height="90%"/>
                       </mx:VBox>
                       <mx:Button label="Browse"  click="bn_Browse_banner_Click()" width="10%" />
                       </mx:HBox>
                       </mx:VBox>
                       <mx:VBox width="50%" height="50%" borderStyle="solid" horizontalAlign="center">
                           <mx:RichTextEditor id="txt_banner" title="Text at banner" borderStyle="solid"  width="357" height="354"/>                   
                       </mx:VBox>   
                  </mx:HBox>   
                      
                  <mx:HBox id="create_charity_left" width="100%" height="100%" borderStyle="solid"  horizontalAlign="center">
                       <mx:VBox width="50%" height="50%"  borderStyle="solid">
                       <mx:Label text="Image at Upper Left Side:" />
                       <mx:HBox verticalAlign="middle"  width="100%" height="100%">
                       <mx:VBox width="100%" height="100%"     borderStyle="solid"  >
                       <mx:Image id="img_left_side_upper" source="" width="90%" height="90%"/>
                       </mx:VBox>
                       <mx:Button label="Browse"  click="bn_Browse_Left_Side_Click()" width="10%" />
                       </mx:HBox>
                       </mx:VBox>
                       <mx:VBox width="50%" height="50%" borderStyle="solid" horizontalAlign="center">
                           <mx:RichTextEditor id="txt_left_side_lower" title="Text at left lower" borderStyle="solid"  width="357" height="354"/>                   
                       </mx:VBox>   
                  </mx:HBox>   

                  <mx:VBox id="create_charity_main_body" width="100%" height="100%" borderStyle="solid" horizontalAlign="center">
                       <mx:RichTextEditor id="txt_main_body" title="Main Body" borderStyle="solid"  width="80%" height="80%"/>                   
                  </mx:VBox>

                  <mx:HBox id="create_charity_right" width="100%" height="100%" borderStyle="solid">
                       <mx:VBox width="50%" height="50%" borderStyle="solid">
                       <mx:Label text="Image at Upper Right Side:" />
                       <mx:HBox verticalAlign="middle"  width="100%" height="100%">
                       <mx:VBox width="100%" height="100%"     borderStyle="solid"  >
                       <mx:Image id="img_right_side_upper" source="" width="90%" height="90%"/>
                       </mx:VBox>
                       <mx:Button label="Browse"  click="bn_Browse_Upper_Right_Side_Click()" width="10%" />
                       </mx:HBox>
                       </mx:VBox>
                      
                       <mx:VBox width="50%" height="50%" borderStyle="solid">
                       <mx:Label text="Image at Lower Right Side:" />
                       <mx:HBox verticalAlign="middle"  width="100%" height="100%">
                       <mx:VBox width="100%" height="100%"     borderStyle="solid"  >
                       <mx:Image id="img_right_side_lower" source="" width="90%" height="90%"/>
                       </mx:VBox>
                       <mx:Button label="Browse"  click="bn_Browse_Lower_Right_Side_Click()" width="10%" />
                       </mx:HBox>
                       </mx:VBox>
                  </mx:HBox>
                                            
                  </mx:ViewStack>             

                  <mx:StringValidator source="{txt_charity_name}" property="text" required="true"/>

                          
                  </PodContentBase>