Background Image URL enclosed in double quotes

Last post 01-27-2011, 8:07 AM by sanjay.joshi. 5 replies.
Sort Posts: Previous Next
  •  12-17-2010, 2:07 AM 65404

    Background Image URL enclosed in double quotes

    Hi,
    when we try to   insert  the Background  image for a td,  CuteEditor encloses the image url in double quotes which interferes with the double quotes  of style attribute.

    You can also just try to add a table and set a image background on a td inside it and you should be able to reproduce it.

     
    is there any way to prevent this so that in place of double quotes, it encloses the image url in single quotes.
     
    Tnaks in Advance,
    Guarav
     
  •  12-17-2010, 2:21 AM 65405 in reply to 65404

    Re: Background Image URL enclosed in double quotes

    Hi sanjay.joshi,
     
    Please try the solution below
     
    1. <%@ Page Language="C#" %>  
    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. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>Untitled Page</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:Editor ID="editor1" runat="server"/>  
    12.     </form>  
    13. </body>  
    14. </html>  
    15.   
    16. <script>  
    17.     function CuteEditor_FilterHTML(editor,code)  
    18.     {  
    19.      return code.split("("").join("('").split("")").join("')");  
    20.     }  
    21.     function CuteEditor_FilterCode(editor,code)  
    22.     {  
    23.      return code.split("("").join("('").split("")").join("')");  
    24.     }  
    25. </script> 
     
    Regards,
     
    Ken
  •  12-24-2010, 7:17 AM 65519 in reply to 65405

    Re: Background Image URL enclosed in double quotes

    It is giving Syntax errors. can you please  cross check it once.
  •  01-25-2011, 7:33 AM 65866 in reply to 65519

    Re: Background Image URL enclosed in double quotes

    Do you have some other solutions it does not seem to be resolving the issue.
    Actually, I am having double quotes for the "Style" Tag and double quotes for Background image interferes with the Style Tag.
    Thanks in Advance.
     
    -Gaurav
  •  01-25-2011, 8:39 PM 65878 in reply to 65866

    Re: Background Image URL enclosed in double quotes

    Hi sanjay.joshi,
     
    I think you get he code like below
     
     
    <td style="background-image: url(&quot;/Editor/uploads/12.jpg&quot;);">&nbsp;</td>
     
    If so, Please try the new example below
     
    1. <%@ Page Language="C#" %>  
    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. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>Untitled Page</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:Editor ID="editor1" runat="server" />  
    12.     </form>  
    13. </body>  
    14. </html>  
    15.   
    16. <script>    
    17.     function CuteEditor_FilterHTML(editor,code)    
    18.      {    
    19.       return code.split("(&quot;").join("('").split("&quot;)").join("')");    
    20.     }    
    21.     function CuteEditor_FilterCode(editor,code)    
    22.     {    
    23.     return code.split("(&quot;").join("('").split("&quot;)").join("')");    
    24.     }    
    25. </script> 
     
    Regards,
     
    Ken
  •  01-27-2011, 8:07 AM 65912 in reply to 65878

    Re: Background Image URL enclosed in double quotes

    Thanks,
     It seems to resolving the issue.
     
    -Gaurav
View as RSS news feed in XML