Hello,
We currently have a custom image manager dialog that is opened from a button added to the toolbar of the RadEditor;
ASP.NET
<telerik:RadEditor ID="RadEditorMessage" runat="server" Width="100%" Height="370px"
ToolsFile="~/App_Data/RadEditor/Default-ToolsFile.xml" RenderMode="Lightweight" EnableAriaSupport="true">
<Tools>
<telerik:EditorToolGroup Tag="FileManagers">
<telerik:EditorTool Name="ImgManager" Text="ImageManager" ShowIcon="true" />
</telerik:EditorToolGroup>
</Tools>
JAVASCRIPT
Telerik.Web.UI.Editor.CommandList["ImgManager"] = function (commandName, editor, args) {
var myCallbackFunction = function (sender, args) {
if (args) {
if (args.href != '') {
editor.pasteHtml(String.format("<img src='{0}' border='0' align='middle' /> ", args.href));
}
}
}
var args = editor.get_html(true) //returns the HTML of the selection.
editor.showExternalDialog(document.getElementById('<%=txtPath.ClientID%>').value,
args,
1024,
600,
myCallbackFunction,
null,
"Image Manager",
false,
Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
false,
true);
};
CODE BEHIND
txtPath.Text = ResolveUrl("~/Controls/ImageManager.aspx");
We would like to open this custom Image Manager Dialog and return the uploaded image to be used in the Image Map Editor.
Is this possible ? And if so, can you provide links/example code on how to implement this ?
Thanks,
Jean-Paul
Basically, this link explains what we have done previously with the custom dialog:
https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/dialogs/custom-dialogs
Hi Jean-Paul,
The Image Map dialog is one of the few editor dialogs which is not designed to be used as a standalone dialog and this is the reason why its integration inside other managers like the Image Manager is not supported since there is no way to pass the dialog params to the Image Map via the dialogOpener function as it is done for example for the ImageEditor dialog inside the ImageManager.ascx external dialog file.
Greetings Rumen !
First of all thanks for your answer.
However, there appears to be a slight misunderstanding. We don't want to open the Image Map dialog from the Image Manager. It is actually the opposite. We want to open our custom Image Manager dialog from the built-in Image Map Editor.
Thanks,
JP