Image Height Width.

Last post 09-30-2010, 4:16 AM by Kenneth. 6 replies.
Sort Posts: Previous Next
  •  09-14-2010, 2:22 PM 64002

    Image Height Width.


    1. we added an image in cute editor, HTML shows - <img border="0" alt="" src="xyz" />
     
    2. After resizing that image, HTML becomes -
     
    <img style="width: 376px; height: 324px" border="0" alt="" src="xyz" width="171" height="227" />
    Please suggest if we can set any property, so that in HTML , we should see only the correct image size.
  •  09-14-2010, 3:17 PM 64007 in reply to 64002

    Re: Image Height Width.

    Dear gurpreet,
     
    Please follow steps:
    2. Select one image
    3. Double click the image, the property dialog will be displayed
    4. You can set the height and width in the property dialog
     
    Thank you for asking
  •  09-14-2010, 3:36 PM 64009 in reply to 64007

    Re: Image Height Width.


    Hi Eric,
     
    my issue is when ever i am resizing any image , the height width is different from the style height width
    shown in the following tag -
    <img style="width: 376px; height: 324px" border="0" alt="" src="xyz" width="171" height="227" />
     
    Thanks
  •  09-14-2010, 6:04 PM 64012 in reply to 64009

    Re: Image Height Width.


    Hi Eric,
     
    my issue is when ever i am resizing any image , the height width is different from the style height width
     
    shown in the following tag -
    <img style="width: 376px; height: 324px" border="0" alt="" src="xyz" width="171" height="227" />
     
    you can see style="width: 376px; height: 324px" is different from width="171" height="227"
     
    We have checked your demo, over there height width is same in both cases,
     
    Any idea how can we fix this on our side?
     
    Thanks
  •  09-14-2010, 8:33 PM 64014 in reply to 64012

    Re: Image Height Width.

    Hi gurpreet,
     
    1. I suggest you upgrade to the  latest version and try again.
     
     
    2. Try create a simple page like below and test it on your site. I thing some style sheet cause this issue.
     
    3. You can remove the css file one by one and check which cause it.
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Assembly="CuteEditor" Namespace="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 runat="server">   
    9.     <title>Untitled Page</title>   
    10. </head>   
    11. <body>   
    12.     <form id="form1" runat="server">   
    13.         <div>   
    14.             <CE:Editor ID="editor1" runat="server" >   
    15.             </CE:Editor>   
    16.         </div>   
    17.     </form>   
    18. </body>   
    19. </html>  
     
    Keep me posted.

    Regards,
     
    ken
  •  09-15-2010, 1:10 PM 64031 in reply to 64014

    Re: Image Height Width.

    I changed all the files but no luck.
     
    Actually i found that we are using -
     
    <CE:Editor ID="Editor1" Width="100%" Height="550" runat="server" ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/AutoConfigure/Minimal.config" MaintainAspectRatioWhenDraggingImage="false"></CE:Editor>
     
    as we don't want to maintain aspect ratio on image resize, so we added - MaintainAspectRatioWhenDraggingImage="false"
     
    if we remove this then image "height width" is same as image "style height width".
     
    Please send us any solution that even if we add "MaintainAspectRatioWhenDraggingImage=false"
    the image "height width" should have the same values within the image tag as of "style height width".
     
    Or is there any way if we can only show either "height width" or the "style height width"?
     
    Its very urgent for us.
     
    Thanks
  •  09-30-2010, 4:16 AM 64256 in reply to 64031

    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 as RSS news feed in XML