Absolute path when inserting images or downloadable files

Last post 01-07-2010, 1:25 PM by capnhairdo. 10 replies.
Sort Posts: Previous Next
  •  09-06-2004, 7:49 AM 1726

    Absolute path when inserting images or downloadable files

    Come on guys.. I have purchased serveral licenses by now and I really wanted to have a standard editor for all my applications. However, this CuteEditor obviously needs a lot of development.

     
    Now, when I insert an image or a downloadable file, the path is absolute !!! Meaning when I publish the whole project, every image and pdf get's downloaded from http://localhost ??? These files are uploaded to a directory CuteEditor can relate to. Then why use absolute paths ?
     
    Also, I still can't add custom colors to the fore- and backgroundcolor dialogs. When I alter the properties in design mode, the page crashes:
    Cannot create an object of type 'System.String[]' from its string representation 'String[] Array' for the 'ColorsList' property.
    When I change it by code.. nothing happens.
     
    CuteEditor seemed a nice product, but if it continues to dissapoint me, or it keeps getting me into a lot of work to create work-arounds, I guess I have no choice then to search for an alternative.
     
    Regards,
    Arjen
  •  09-06-2004, 10:39 AM 1728 in reply to 1726

    Re: Absolute path when inserting images or downloadable files

     
    Arjen,

     

    Please check your Editor.ChangeAbsoluteURLsToRelative Property setting.

     

    By default Internet Explorer converts all URLs in hyperlinks (anchor tags) and images (img tags) to absolute URLs.

    When this property is set to true (the default), CuteEditor strips out the local server name from all A and IMG tags if the hostname in the URL matches the current hostname.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-08-2004, 6:07 AM 1742 in reply to 1728

    Re: Absolute path when inserting images or downloadable files

    That setting doesn't work.. at least not correct.

     
    At my system, I have a normal Windows XP IIS, so sites in development run under a virtualdirectory at my IIS. I open up the content management system, which is located in /admin. When I insert a link to "pages.aspx?id=18" the, outcome is:
     
    a href="/virtualdirectory/admin/page.aspx?id=18"
     
    That is not correct. It is ofcourse a relative url... but relative to what ? Only the webserver on which the page is running. The virtualdirectory is absolute (which is NOT a good thing as the site as going to run under a new website at the IIS on the webserver). And, the /admin/ directory is also included in the link. That's a problem, because the page.aspx is not in the admin directory, but above it.
     
    So.. when I enter "pages.aspx?id=18" why does it not simply add a link <a href="pages.aspx?id=18"> ??????
  •  09-08-2004, 1:30 PM 1748 in reply to 1742

    Re: Absolute path when inserting images or downloadable files

    Arjen,
     
    When you create a link in /virtualdirectory/admin/ directory, Internet Explorer converts all URLs in hyperlinks (anchor tags) and images (img tags) to absolute URLs.
     

     

    When ChangeAbsoluteURLsToRelative property is set to true (the default), CuteEditor strips out the local server name from all A and IMG tags if the hostname in the URL matches the current hostname.
     
     
    We undersand you want is totally relative path no matter where you create the link:
     
     
    Right now CuteEditor doesn't support this feature. We have discussed this issue. We will add a new property in the next release to resolve this problem.
     
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-08-2004, 6:49 PM 1752 in reply to 1748

    Re: Absolute path when inserting images or downloadable files

    We had the same problem. We ended up having to do GREP search/replace to trim the URL.

     
    We've, unfortunately, had to resort to GRERP s/r functions to get around a LOT of CuteEditor problems.
     
    So, yea, I feel the pain and also feel that CuteEditor needs a lot of polish still.
     
    That said, it DOES have a very nice user interface, which we like, and a decent price.
     
    The reality is that it seems like ALL WYSIWYG editors out there right now have some major drawbacks in one form or another. So, the quest continues for the 'perfect' one.
  •  12-05-2005, 2:41 PM 13401 in reply to 1748

    Re: Absolute path when inserting images or downloadable files

    I apologize for bumping an old thread. Was this new property added in the next release? If so, what is it called? Thanks.
  •  12-05-2005, 2:46 PM 13402 in reply to 13401

    Re: Absolute path when inserting images or downloadable files

    cangelly,

    No problem.

    Editor.ChangeAbsoluteURLsToRelative Property have been removed in the version 4.0.

    Please Relative or Absolute path issues, please check the following example:
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  12-05-2005, 3:04 PM 13403 in reply to 13402

    Re: Absolute path when inserting images or downloadable files

    Thanks. Maybe I'm missing something...but how is that link helpful? I see that the changes in the path are relative or absolute depending on what you select but without the codebehind how do I know what property is being set?
  •  12-05-2005, 4:05 PM 13408 in reply to 13403

    Re: Absolute path when inserting images or downloadable files

    cangelly,
     
    If you want to use the relative path, you need to set  Editor1.UseRelativeLinks property and Editor1.RemoveServerNamesFromUrl property to true.

    For example:

        Editor1.UseRelativeLinks  = true
        Editor1.RemoveServerNamesFromUrl = true

    or

    <CE:Editor UseRelativeLinks="true" RemoveServerNamesFromUrl="true" id="Editor1" runat="server" ></CE:Editor>



     
    If you want to use the absolute path, you need to set  Editor1.UseRelativeLinks property and Editor1.RemoveServerNamesFromUrl property to false.

    For example:

        Editor1.UseRelativeLinks  = false
        Editor1.RemoveServerNamesFromUrl = false

    or

    <CE:Editor UseRelativeLinks="false" RemoveServerNamesFromUrl="false" id="Editor1" runat="server" ></CE:Editor>

    Hope it helps.

    Let me know if you have any further questions.

     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  12-05-2005, 4:53 PM 13420 in reply to 13408

    Re: Absolute path when inserting images or downloadable files

    Adam,

    Thanks again for the quick response, that helped.

    I do have another question. It involves your post Writing to a UNC path...

    I followed those steps and it works for the ImageGalleryPath in that when I click on either of the "Insert Image" buttons the resulting popup page loads correctly and I can select an image, etc.

    Here is my environment and a description of what I did:

    Server A is running IIS with a CMS sytem that uses the CuteEditor control. I needed to access images on a different physical server (Server B) so I created a virtual directory (virtual_directory) on Server A whose path is to \\Server_B\some_dir\. Again, this worked in that I could view the image gallery, select an image from the desired location provided by the virtual directory, etc.

    However, once the image has been inserted into the Editor control the image does not appear because its link is incorrect. The link is incorrect because the virtual directory name is being included as part of the path as shown in this example path below.

    http://www.mysite.com/virtual_directory/mockup/uploads/images/banner.jpg

    I need for the path to actually be:

    http://www.mysite.com/mockup/uploads/images/banner.jpg

    Please advise, thanks.

  •  01-07-2010, 1:25 PM 58084 in reply to 13408

    Re: Absolute path when inserting images or downloadable files

    Realize this post is 4–5 years old. Has there been any improvements in the image path handling in CuteEditor since?
     
    Have two sites on the same IIS server, running as subdomains of a single TLD:
     
    C:\websites\website_a.com = http://a.website.com
    C:\websites\website_b.com = http://b.website.com 
     
    Would love share images between them instead of having to manage duplicate image folders (which contain several thousand images meticulously organized into subfolders). If you set an absolute path for the images that is outside the root folder of the site that CuteEditor is installed on, it won't work. That is, if CuteEditor is running in the website_a.com folder above, I can't reference an image folder in the website_b.com folder:
     
    <security name="ImageBrowserPath">C:\websites\website_b.com\images</security> 
     
    Would be really nice if, like many other editors, CuteEditor offered a way to use any folder on the server and simply specify in the configuration what the corresponding URL for that folder is. WSYIWYGPro implements this with two variables:
     
    // IMAGE_FILE_DIRECTORY +
    // Set this to the file path path of your images folder.
    // This value must end in a '/'
    //
    // By default this variable is null, which means that this feature is disabled!
    //
    // Examples: (actual file paths will vary between servers, check with your hosting company if unsure):
    //
    // Windows:
    // define('IMAGE_FILE_DIRECTORY', 'c:/html/users/mywebsite/html/images/');
    //
    // Linux:
    // define('IMAGE_FILE_DIRECTORY', '/var/httpd/htdocs/www.mywebsite.com/images/');

    define('IMAGE_FILE_DIRECTORY', 'C:/websites/website_b.com/images/');

    // IMAGE_WEB_DIRECTORY +
    // The web address of the folder specified above (the URL you'd type into a browser to get to your images folder).
    // This variable should always end in a /
    //
    // By default this variable is null, which means that this feature is disabled!
    //
    // Examples:
    // It could be a full web address like this:
    //
    // define('IMAGE_WEB_DIRECTORY', 'http://www.mysite.com/images/');
    //
    // Or it could be addressed from the document root like this:
    //
    // define('IMAGE_WEB_DIRECTORY', '/images/');

    define('IMAGE_WEB_DIRECTORY', 'http://b.website.com/images/');
View as RSS news feed in XML