12 Answers, 1 is accepted
It seems that the FileBrowserContentProviderTypeName property was not exposed in the RadEditor API in the official release. I will ensure that the property will be available in the SP1 of RadEditor Prometheus, scheduled for the beginning of the next week. While waiting for the hotfix, you could use the following workaround to set your own provider:
DialogOpener opener = RadEditor1.FindControl(RadEditor1.ID + "dialogOpener") as DialogOpener;
string myContentProviderTypeName = typeof(MyContentProviderClass).AssemblyQualifiedName;
opener.DialogDefinitions["ImageManager"].Parameters["FileBrowserContentProviderTypeName"] = myContentProviderTypeName;
opener.DialogDefinitions["DocumentManager"].Parameters["FileBrowserContentProviderTypeName"] = myContentProviderTypeName;
public abstract string StoreFile(UploadedFile file, string path, string name, params string[] arguments);
The other method could just return string.Empty or other string of your choice. It will never be called.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
opener.DialogDefinitions["ImageManager"] throws
The given key was not present in the dictionary.
The dialog definitions are populated after Page.PreRender, so to access them you will have to override the Render method of the Page:
protected override void Render(HtmlTextWriter writer)
{
DialogOpener opener = RadEditor1.FindControl(RadEditor1.ID + "dialogOpener") as DialogOpener;
string myContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;
opener.DialogDefinitions["ImageManager"].Parameters["FileBrowserContentProviderTypeName"] = myContentProviderTypeName;
opener.DialogDefinitions["DocumentManager"].Parameters["FileBrowserContentProviderTypeName"] = myContentProviderTypeName;
base.Render(writer);
}
I apologize for not mentioning that.
The SP1 of RadEditor Prometheus, scheduled for 10th October will introduce a new property:
RadEditor1.ImageManager.ContentProviderTypeName = myContentProviderTypeName;
which will let you set content provider without hacking into RadEditor.
Best wishes,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
i have noticed that u write a lot of vital code at prerender is there any specific reason for that?
Regards,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
private void radGridArticles_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridEditableItem && e.Item.IsInEditMode) |
{ |
Control control = LoadControl("/webforms/Content/articles/articlesTabStrip.ascx"); |
((GridEditFormItem)e.Item).EditFormCell.Controls.Add(control); |
} |
} |
where should i place the code u posted in order to work??
also the none of the editor's tools is visible how can i enable them i have tried the toolsfile propertu with no luck
Hello a.bek,
Regarding the FileBrowserContentProviderTypeName property: I suggest waiting for wednesday, when we are going to release SP1 for RadEditor Prometheus, which will contain a proper way to set it.
The tools problem could be easily resolved if you define them inline between the RadEditor tags:
http://www.telerik.com/help/radcontrols/prometheus/?AddingStandardButtons.html
On the other hand, could you please check which version of RadEditor Prometheus are you using? As far as I remember, this problem was present in the Futures build...
Best wishes,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
but cannot make the image preview to work when i click on a file no request starts
is this another bug ?? can we have a working example of the dbprovider?
Yes, this is a known bug, which we will try to address for the upcoming hotfix of RadEditor, scheduled for the next couple of days.
All the best,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
On mine it works find in dev, but on live the image won't preview and the url which gets added starts with
http://itemhandler.ashx/?path
so it obviously isn't adding on the application path, although there is the code in the provider:
if (_itemHandlerPath.StartsWith("~/"))
{
_itemHandlerPath = HttpContext.Current.Request.ApplicationPath + ItemHandlerPath.Substring(1);
}
Thanks
got it to work by specifying the full url.
not sure why
~/ItemHandler.ashx
didn't work on live
We are glad that you managed to solve this problem on your own. Perhaps there was a difference in the web servers configuration (dev/live).
Kind regards,
Lini
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center