Automatic Resize

Last post 02-01-2013, 2:09 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  01-31-2013, 6:44 AM 76763

    Automatic Resize

    Hi,

     

    I've notced in the current version of the editor it does not resize at all when set at 100% width.  So I have situation where a client will resize their CMS and the text editor is still massivly long.

    Is there a way to make it automatically resize?

  •  01-31-2013, 12:46 PM 76765 in reply to 76763

    Re: Automatic Resize

    Hi gim-matt,

     

    It works fine for me, can you try the example page below? Does it work on your end too?

     

    1. <%@ Page Language="c#" %>  
    2.   
    3. <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>  
    4.   
    5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    6. <html xmlns="http://www.w3.org/1999/xhtml">  
    7. <head>  
    8.     <title>example</title>  
    9. </head>  
    10. <body>  
    11.     <form id="Form1" method="post" runat="server">  
    12.         <div style="width:900px"></div>  
    13.         <RTE:Editor runat="server" ID="Editor1"  Width="100%"/>  
    14.     </form>  
    15. </body>  
    16. </html>  
     

    Regards,

     

    ken 

  •  02-01-2013, 5:12 AM 76774 in reply to 76765

    Re: Automatic Resize

    Sorry I should have be clearer.

    It resizes fine on refresh, but I mean if the browser windows is resized without a refresh.
  •  02-01-2013, 2:09 PM 76781 in reply to 76774

    Re: Automatic Resize

    Hi gim-matt,

     

    You can try the way below, achieve it by javascript code.

     

    1. <%@ Page Language="c#" %>  
    2.   
    3. <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>  
    4.   
    5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    6. <html xmlns="http://www.w3.org/1999/xhtml">  
    7. <head>  
    8.     <title>example</title>  
    9. </head>  
    10. <body>  
    11.     <form id="Form1" method="post" runat="server">  
    12.         <RTE:Editor ID="editor1" runat="server"  Width="100%"/>  
    13.     </form>  
    14. </body>  
    15. </html>  
    16. <script type="text/javascript">  
    17.     setInterval("refreshTime()", 1000);  
    18.     var config;  
    19.     function RichTextEditor_OnLoader(loader) {  
    20.         config = loader._config;  
    21.     }  
    22.     function refreshTime() {  
    23.         var skinctrl = config.skin_control;  
    24.         skinctrl.set_width(window.innerWidth);  
    25.     }  
    26. </script>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML