Re: Image Height Width.

  •  09-30-2010, 4:16 AM

    Re: Image Height Width.

    Hi gurpreet,

    Please try the example below

     

    1. <%@ Page Language="C#" AutoEventWireup="True" %> 
    2.  
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %> 
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    5.  
    6.  
    7. <html xmlns="http://www.w3.org/1999/xhtml"
    8. <head id="Head1" runat="server"
    9. </head> 
    10. <body> 
    11.     <form id="Form1" runat="server"
    12.         <CE:Editor ID="editor1" runat="server"  MaintainAspectRatioWhenDraggingImage="false"
    13.         </CE:Editor> 
    14.         </form> 
    15. </body> 
    16. </html> 
    17.  
    18. <script> 
    19. function cleanImg() 
    20. {  
    21.     var editor1=document.getElementById("<%= editor1.ClientID %>"); 
    22.     var editdoc = editor1.GetDocument(); 
    23.     for(var i=0;i<editdoc.images.length;i++) 
    24.     { 
    25.         editdoc.images[i].removeAttribute("width"); 
    26.         editdoc.images[i].removeAttribute("height"); 
    27.     } 
    28. setInterval(cleanImg,1000); 
    29.  
    30. </script> 
    31.  
    32.   

     

     

View Complete Thread