With the previous RadEditor we could use an .aspx for a modal dialog from the toolbar. Now it seems it has to be .ascx user control, meaning all the dialogs we wrote as web pages before will not work now. Is this the case? The new radwindow still seems to use aspx’s for dialogs, so I’m curious why the ascx change for the RadEditor. I hope we can still use aspx's for dialogs, as converting them all to ascx's will be far from trivial for us.
11 Answers, 1 is accepted
Yes, it is possible to add ASPX page to a custom dialog of RadEditor "Prometheus". Here is a sample code:
<telerik:RadEditor ID="contentEditor" runat="server"></telerik:RadEditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args)
{
var myCallbackFunction = function(sender, args)
{
editor.pasteHtml(String.format("<img src='{0}' />", args.src))
}
editor.showExternalDialog(
'../UserControls/EditorDialogs/LibraryImageDialog.aspx',
null,
600,
400,
myCallbackFunction,
null,
'ImageLibraryDialog',
true,
Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
false,
false)
};
</script>
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Cool - that worked right away.
However, there is some odd imagery shown in the status bar of the dialog. I need to hide the status bar until thats fixed - how is that done?
I guess I need some documentation for the new showExternalDialog method - it has more parameters than the old classic version.
Also, I had used the old radwindow script in my dialog (which works)
<script type="text/javascript" src="../RadControls/Editor/Scripts/7_3_1/RadWindow.js"></script>
I'd like to swap that out to the Prometheus version, which hopefully doesn't require me to change the script version with each new release. How is that done?
Thanks!
We are not sure what is causing the problem with odd imagery shown in the status bar. Could you please open a support ticket and send a screenshot of the problem? We can help you to hide the statusbar with CSS but we need to see the problem first.
We are currently working on the RadEditor dialogs and their implementation is still in development. In the official build of RadEditor "Prometheus" there will be no need to reference a RadWindow script file into the dialog. You can look at custom dialog example: Custom Dialogs.
If you are not able to work out how to pass back and forward values from the dialog to the page - open a ticket send us a working project with your dialog and we will make the necessary adjustments.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I don't really need the status bar,so I'd like to know how to disable it with the editor.showExternalDialog. The documentation does not list that function yet.
Thank you for the additional information!
We were able to reproduce the Default2006 skin problem and we fixed it in our in-house build of RadEditor "Prometheus". The problem will not exist in the upcoming hotfix of RadEditor due in the end of February' 2008.
Currently, you can hide the dialog's statusbar with the following style:
<style>
.statusbarrow
{
display:none;
}
</style>
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
in the document there is only a section for showDialog.
The showExternalDialog method is not documented yet, because we will enhance the RadEditor "Prometheus" custom dialogs for the official release, due in April. We will update the help with detailed information about this method once we finish the development of the custom dialogs.
Here is a list of the available showExternalDialog arguments:
showExternalDialog : function(url, argument, width, height, callbackFunction, callbackArgs, title, modal, behaviors, showStatusbar, showTitlebar)
I hope this helps.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The editor's showExternalDialog() method has the following arguments:
showExternalDialog(url (aspx/html file), argument, width, height, callbackFunction, callbackArgs, title, modal, behaviors, showStatusbar, showTitlebar);
e.g.
editor.showExternalDialog(
'InsertLink.aspx',
argument,
270,
300,
myCallbackFunction,
null,
'Insert Link',
true,
Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
true,
true);
};
All the best,
Rumen
the Telerik team
The WindowBehaviors are
None: 0, Resize: 1, Minimize: 2, Close: 4, Pin: 8, Maximize: 16, Move: 32, Reload: 64, Default: (1 + 2 + 4 + 8 + 16 + 32 + 64)
and you can set them with numbers as shown below:
editor.showExternalDialog(
url,
null,
270,
300,
myCallbackFunction,
null,
'',
true,
1 + 2 + 4 + 8 + 16 + 32 + 64,
false,
true);
args.set_cancel(true);
All the best,
Rumen
the Telerik team