Source reference issue with Templates

Last post 07-29-2011, 6:24 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  03-10-2011, 5:08 AM 66612

    Source reference issue with Templates

    Hi there,
     
    We have recently developed some HTML templates for our application with the intention that users can select from a choice of these templates using the 'Insert Templates' icon.

    We found a problem when importing the HTML in that the <img src=""> starts from the root of the cuteEditor directory rather than the root of the virtual directory, which results in the incorrect folder being referenced. We didnt have any problems with "background-image:url()" css property.
     
    Example:
     
    <td width="150" height="108" align="center" valign="middle"><img src="../uploads/logo.png" width="100" height="100" /></td>
     
    will result in:
    <td width="150" height="108" align="center" valign="middle"><img src=http://localhost/APPLICATION/Shared/Editor/uploads/logo.png" width="100" height="100" /></td>
     
     
    Hope you can help
     
    Regards
     
     
  •  03-10-2011, 9:36 AM 66615 in reply to 66612

    Re: Source reference issue with Templates

    Dear lazzyad,
     
    Please refer to http://www.cutesoft.net/example/Relative-or-Absolute-URLs.aspx , have you ever set "URLType" to  "URLType.Absolute;"? You can set it to "URLType.Default;" and try it again.
    The source code of this online demo can be found in download package.
     
    Thank you for asking
  •  07-29-2011, 3:47 AM 68987 in reply to 66615

    Re: Source reference issue with Templates

    Hi,
     
    this problem still remained even after your help, so i have since upgraded cuteEditor but now am running into the problem where if i set URLType="Default"
     
    entering <img src="../uploads/img.png"> works fine and the URL is no longer converted to Absolute.
    entering BACKGROUND-IMAGE: url(../uploads/img.png); as a style property for a table column will convert it to Absolute, regardless of the CuteEditor's setting.
     
    Any ideas?
     
     
  •  07-29-2011, 6:24 AM 68993 in reply to 68987

    Re: Source reference issue with Templates

    Hi lazzyad,
     
    The demo works fine for me. Can you reproduce it on http://cutesoft.net/example/general.aspx?
     
    If so, please show me the steps, it will very helpful.
     
    Regards,
     
    Ken
     
     
View as RSS news feed in XML