$find("<%=radEditor.ClientID%>").showDialog("ImageManger", null, ClientCallBackFunction);
I have also discovered that the return value from the dialog can be found in the resultObj parameter in the ClientCallBackFunction(sender, resultObj) function. (Specifically in the resultObj['Result']['outerHTML']).
I am trying to figure the same for the other dialogs, specifically the Document Manager, Flash Manager, and Media Manager. Can you please provide me how to:
- The parameters for the showDialog function. (i.e. I have seen documentation on the showDialog, but it is specific to custom dialogs. I need to know the parameters for the Sharepoint specific dialogs).
- How to retrieve the result of the the dialogs. (i.e. When I tried it with the FlashManager, I cannot seem to find the correct property in the resultObj that outputs the <object> tag for the selected flash (.swf) file.
5 Answers, 1 is accepted
In our online knowledge base you can find an article called Using the Image and Document managers outside RadEditor: http://localhost:2252/Live%20Demos/Editor/Examples/UseStandAloneDialogues/OpenDialogue.aspx .
I believe that it is helpful in your case.
You also should make sure that you have enabled the dialogues that you want to use. In order to do so you need to edit the respective ToolsFile.xml file which is located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\22.214.171.124__1f131a624888eeed\Resources folder.
Just add these nodes:
<tool name="FlashManager" />
<tool name="DocumentManager" />
<tool name="MediaManager" />
the Telerik team
The link does not work. I found another knowledge base item here: http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx. Is this the same one?
If so, I have already tried using this approach. I have 2 issues with this sample:
- This sample still does not answer #3 on my original post. (i.e. When I tried it with the FlashManager, I cannot seem to find the correct property in the resultObj that outputs the <object> tag for the selected flash (.swf) file.)
I apologize for the broken link that I sent you before. Yes, this is the same article.
Regarding the first issue, could you make sure, that you deployed RadControls for ASP.NET Ajax correctly.
1. First you need to install Telerik.Web.UI.dll in the GAC (Global Assembly Cache).
2. You should add a few <SafeControl> entries within the <SafeControls> section in your web.config:
Regarding the FlashManager issue if your callback function is defined like FlashManagerFunction(sender, args) , you can find the output string in args.Result property.
Hope this helps.
the Telerik team
I have all those SafeControls setup in the web.config (still doesn't work). Does I have to add some kind of httpHandler in the web.config?
There is a known issue with the editor dialogs and SharePoint 2007. The dialogs are shown via a "dialog handler" page. By default, the editor looks for this page in the same folder as the page it is on. So, for example if the editor is on http://moss/Pages/Default.aspx, it will look for the dialog handler at http://moss/Pages/Telerik.Web.UI.DialogHandler.aspx. Usually, this is not a problem, since you only need a <httpHandler> definition in the web.config file for "Telerik.Web.UI.DialogHandler.aspx". Unfortunately, SharePoint has a special handler for ASPX files, which overrides the default ASP.NET handler and the "Telerik.Web.UI.DialogHandler.aspx" handler in the web.config. In order for the dialogs to show in SharePoint 2007, you need to instruct the editor to use a different url for the dialog handler, which is not controlled by the SharePoint. One such example is the layouts folder (http://moss/_layouts/). Try setting the editor's DialogHandlerUrl to "/_layouts/Telerik.Web.UI.DialogHandler.aspx" and see if that works. Note that you still need to have the httpHandler definition in the web.config file.
the Telerik team