This is a migrated thread and some comments may be shown as answers.

RadEditor ImageManager Path

1 Answer 283 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Atul Srivastav
Top achievements
Rank 1
Atul Srivastav asked on 17 Nov 2009, 02:57 PM
Hi

There is a requirement to manage Media Manager, Images Manager etc in RadEditor with the files located outside the web application.
Is it possible to provide either physical path or complete web path like(http://mydomain/Images) as ViewPath (or DeletePath etc).

Also I need to attach CSS in "ApplyClass" tool of editor with either physical path like("C:/MyDirectory/MyCustomCSS/MYCss.css") or the complete web path out side of web application like (http://MyDomain/MYCSS/MYCSS.css).

Please let me know the way.

Please reply soon. Its urgent.
Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Nov 2009, 08:22 AM
Hi Atul,

It is not possible to directly upload and display images from other sites, because the ViewPath and UploadPath properties expect that the Images folder to be:
  • a subdirectory of your web application
  • a directory placed in the root of IIS - you can set this folder by using the / forward slash symbol, e.g.
    RadEditor1.ImageManager.UploadPaths  = new String []{"/Images"};
  • a virtual directory of your web application that has a physical path pointing outside of your web application.
  • a shared drive that is a virtual folder of your web application. You can see the following KB article for more information: Uploading images and files to a Shared Drive.

This information is described in the following KB article: Uploading images to the server (upload tab is disabled).

There is however another approach which will allow you to insert images from remote server. To see how to implement it use the solution provided in the following KB article:
Inserting images from a remote server.

You can also implement your own file browser content provider that allows using virtually any type of file sources for the FileBrowser dialogs (Image Manager, DocumentManager, Media Manager, Flash Manager, Template Manager):
  • Database
  • Custom role-based CMS system
  • Web service
  • Applications which use URL Rewriters

As to your second request: It is not possible to access, parse and load CSS classes from external link http://mydomain.com/includes/mainstyle.css with JavaScript, because of the Firefox security restrictions. The problem does not exist in Internet Explorer.

You should put the mainstyle.css file in your project or in a virtual folder pointing to the root of your project. Therefore Firefox JavaScript engine will be able to access and read the CSS file, after that the editor will parse the classes and will populate the "Apply CSS Dropdown".

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Atul Srivastav
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or