Problem with HtmlEditor loading

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Problem with HtmlEditor loading

    Hello,

    Sometimes after Htmleditor render in a window, it seems that the component is not fully loaded (the textarea doesn't react like an htmleditor and the Font dropdown is deactivated).
    The only way i have is to reload the page.

    Is there any workaround ?

    Ps: I'm using Ext.net RC1 on IE 9.


    Thank you
  2. #2
    Hi,

    Please provide a simplified .aspx page to reproduce.

    Also any other details can be helpful.
  3. #3
    Hello,

    Here is the code of mywindows including htmleditor :

    <%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="WebDesk.test" %>
    <%@ Register assembly="Ext.Net" Namespace="Ext.Net" tagprefix="ext" %>
    
    
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    	<HEAD id="HEAD1" runat="server">
    		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
    		<meta content="C#" name="CODE_LANGUAGE">
    		<meta content="JavaScript" name="vs_defaultClientScript">
    		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    		<link rel="stylesheet" type="text/css" href="Styles/standard.css" />
    		<link href="/MyextJs/resources/css/htmleditorplugins.css" rel="stylesheet" type="text/css" />
    		
    	
    
    
      
    
    
    	  
    <script runat="server">
        protected void Action_Save(object sender, EventArgs e)
        {
            HtmlEditor1.SyncValue();
            if (ActionDelay.Text != "" && HtmlEditor1.Value != "" && HtmlEditor1.Value != "&nbsp;")
            {
                if (HtmlEditor1.Value.ToString().Length > 4000)
                {
                    Ext.Net.MessageBox msg = new MessageBox();
                    msg.Alert("Le contenu de l'action est trop long", "La taille maximale d'une action est 4000 caractères<br>Veuillez la modifier.");
                    msg.Show();
    
                }
                else
                {
    
                    //Save();
                    Window1.Close();
    
                    Ext.Net.Response resp = new Response(true);
                    resp.Data = "window.location.replace(window.location)";
                    resp.Write();
                }
            }
            else
            {
                Ext.Net.MessageBox msg = new MessageBox();
                msg.Alert("Erreur", "Veuillez saisir le texte et la durée de l'action");
                msg.Show();
            }
    
        }
        
        
        
    </script>	   
    	   
    	   
    	</HEAD>
    	<body bgColor="#FFFFFF" topMargin="0" rightMargin="0">
    		<form id="WebForm3" method="post" encType="multipart/form-data" runat="server">
    			<ext:ResourceManager ID="ResourceManager1" runat="server" SourceFormatting="true"/>
    			
    				
    				<ext:Window ID="Window1" runat="server" Modal="true" Resizable="false" Icon="DatabaseEdit" Title="Ajouter une action" Hidden="false" Height="400" Width="800" Padding="0">
    				<BottomBar>
       				 <ext:StatusBar ID="StatusBar1"  runat="server" StatusAlign="Right"  >
    				                <Items>
    				                    <ext:Label ID="MyLabel"   runat="server" Text="Type d'action :"  />
    				                    <ext:ComboBox ID="ComboBoxActions" runat="server" Editable="false" DisplayField="Name" ValueField="Name" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" SelectOnFocus="true" >
    				                       <Store>
    				                       <ext:Store ID="StoreCombos" runat="server" >
                                            <Reader>
                                                <ext:JsonReader>
                                                    <Fields>
                                                        <ext:RecordField Name="Name" Type="String" Mapping="Name"/>
                                                    </Fields>
                                                </ext:JsonReader>
                                            </Reader>
                    </ext:Store>
    				                       </Store>
    				                        <Listeners>
                                                <Select Handler="#{HtmlEditor1}.setValue('<b>'+#{ComboBoxActions}.value+' :</b>'+#{HtmlEditor1}.getValue());" />
                                            </Listeners> 
    				                    </ext:ComboBox>
    				                    <ext:ToolbarSpacer Width="5" />
    				                    <ext:Label ID="MyLabel2" runat="server" Text="Durée (Min) :"  />
    				                    <ext:TextField runat="server" ID="ActionDelay" Width="40" MaxLength="6"  MaskRe="/[0-9]/" />
    				                    <ext:ToolbarSpacer Width="5" />
    				                    <ext:Checkbox runat="server" id="HideAction" Margins="2" LabelAlign="Left" BoxLabel="Cacher au Client"   />
    				                </Items>
    				        </ext:StatusBar>
    				        </BottomBar>
    				
    				<Items>
    				        
    				
    				         <ext:Panel ID="Panel1" runat="server" Layout="fit"  AutoHeight="true">
                                        <Items>
                                            <ext:HtmlEditor ID="HtmlEditor1" runat="server" Text="" >
                                            <Plugins><ext:GenericPlugin ID="WordPlugin" runat="server" Path="/MyextJs/plugins/htmleditor/Ext.ux.HtmlEditor.Plugins-0.2-all-debug.js" InstanceName="Ext.ux.form.HtmlEditor.Word"/>  
                                                </Plugins>
                                                <Listeners>
                                                <AfterRender Handler="#{HtmlEditor1}.setValue('');" />
                                                </Listeners>
                                            </ext:HtmlEditor>
                                        </Items>
                                   
                            </ext:Panel>
                           
    				         
       				</Items>
       				
       				<Buttons>
       				<ext:Button   ID="ButtonSave" runat="server" Text="Ajouter" Icon="Add">
       				<DirectEvents>
       				<Click OnEvent="Action_Save" />
       				</DirectEvents>
       				</ext:Button>   
                    <ext:Button   ID="ButtonCancel" runat="server" Text="Annuler" Icon="Decline" >
                                                        <Listeners>
                                                            <Click Handler="#{Window1}.hide();#{HtmlEditor1}.setValue('');" />
                                                        </Listeners>
                    </ext:Button>
       				</Buttons>
       				<DirectEvents>
       				</DirectEvents>
    				</ext:Window>
    				
    				
    				
    				
    				</form>
    	</body>
    </HTML>

    I can reproduce the problem by refreshing the page many times.

    Thank you
  4. #4
    Is the plugin required to reproduce the problem?

    I'm just getting
    Ext.ux.form is undefined
    and forth "404 Not found" errors.

    Please simplify the code as much as you can, removing all things which is not required to reproduce the problem.

    Also, what browser do you test under?
  5. #5
    Hello,

    I'm using Internet Explorer 9.

    Here's the clean code :

    <%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="WebDesk.test" %>
    <%@ Register assembly="Ext.Net" Namespace="Ext.Net" tagprefix="ext" %>
    
    
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    	<HEAD id="HEAD1" runat="server">
    		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
    		<meta content="C#" name="CODE_LANGUAGE">
    		<meta content="JavaScript" name="vs_defaultClientScript">
    		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    		
      
    <script runat="server">
        protected void Action_Save(object sender, EventArgs e)
        {
           
        }
        
        
        
    </script>	   
    	   
    	   
    	</HEAD>
    	<body bgColor="#FFFFFF" topMargin="0" rightMargin="0">
    		<form id="WebForm3" method="post" encType="multipart/form-data" runat="server">
    			<ext:ResourceManager ID="ResourceManager1" runat="server" SourceFormatting="true"/>
    				<ext:Window ID="Window1" runat="server" Modal="true" Resizable="false" Icon="DatabaseEdit" Title="Ajouter une action" Hidden="false" Height="400" Width="800" Padding="0">
    				    <Items>
    				        <ext:Panel ID="Panel1" runat="server" Layout="fit"  AutoHeight="true">
                                        <Items>
                                            <ext:HtmlEditor ID="HtmlEditor1" runat="server" Text="" >
                                                <Listeners>
                                                    <AfterRender Handler="#{HtmlEditor1}.setValue('');" />
                                                </Listeners>
                                            </ext:HtmlEditor>
                                        </Items>
                            </ext:Panel>
                        </Items>
       				    <Buttons>
       				        <ext:Button   ID="ButtonSave" runat="server" Text="Ajouter" Icon="Add">
       				            <DirectEvents>
       				                <Click OnEvent="Action_Save" />
       				            </DirectEvents>
       				        </ext:Button>   
                            <ext:Button   ID="ButtonCancel" runat="server" Text="Annuler" Icon="Decline" >
                              <Listeners>
                                <Click Handler="#{Window1}.hide();#{HtmlEditor1}.setValue('');" />
                              </Listeners>
                            </ext:Button>
       				    </Buttons>
    				</ext:Window>
    				</form>
    	</body>
    </HTML>
  6. #6
    Thanks for cleaned up code.

    Unfortunately, I can't see the problem.

    Can you provide a screen-shot what I should reproduce?

    By the way, what Ext.Net sources do you use? RC2?

Similar Threads

  1. Problem with HTMLeditor width
    By haltenberg in forum 1.x Help
    Replies: 4
    Last Post: Aug 17, 2011, 5:37 PM
  2. Problem in Htmleditor
    By speedstepmem4 in forum 1.x Help
    Replies: 1
    Last Post: Jun 03, 2009, 11:19 AM
  3. HtmlEditor Post Problem
    By Dgsoft.ru in forum 1.x Help
    Replies: 5
    Last Post: Apr 29, 2009, 4:14 AM
  4. Htmleditor Problem
    By designworxz in forum 1.x Help
    Replies: 0
    Last Post: Mar 04, 2009, 6:50 AM
  5. HtmlEditor link problem
    By designworxz in forum 1.x Help
    Replies: 0
    Last Post: Feb 03, 2009, 1:32 AM

Posting Permissions