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

Bug (?): editor.fire("MediaManager", {}); fails

2 Answers 59 Views
Editor
This is a migrated thread and some comments may be shown as answers.
A. Drost
Top achievements
Rank 1
A. Drost asked on 31 Mar 2011, 12:28 AM
Currently we are working on a new project. With the new RadRibbonBar (using v.2011.1.315.40) - which is very nice - we decide to try to implement a RibbonBar for the RadEditor. Basically we are rewiring all the calls to the RadEditor using the javascript fire() method just as in the example at the demo site.

Sofar this was working perfectly. However when doing:

editor.fire("MediaManager");

we will get the javascript error:

"Runtime-fout Microsoft JScript: Sys.ArgumentNullException: Dialog Parameters for the MediaManager dialog do not exist
Parameter name: dialogName"


A trace on the  editor javascript object showed that

editor._dialogOpener._dialogDefinitions.MediaManager

Is expected but does not exists. (See attachment) For all to other dialogs like 'LinkManager' or 'TableWizard' it the DialogDefinitions are set.

---

To overcome this problem we tried to create a work-arround:

var ImageManagerDefinitions = editor._dialogOpener._dialogDefinitions.ImageManager;
var MediaManagerDefinitions = objectCloner(ImageManagerDefinitions)
MediaManagerDefinitions.Title = "Media Manager";
editor._dialogOpener._dialogDefinitions.MediaManager = MediaManagerDefinitions;

However this is not the full solution.. Because the ImageManager is now loaded. To make the work-arround functional de SerizalizedParameter of the Media Manager is required. Sofar we didn't find out how to get this Parameter.

Hope you can fix this bug and  tell us how to get that SerizalizedParameter  or tell us that we are doing something realy wrong here...





2 Answers, 1 is accepted

Sort by
0
A. Drost
Top achievements
Rank 1
answered on 31 Mar 2011, 03:41 PM
Actually the same problem ocuures with the FindAndReplace Dialog.
0
Dobromir
Telerik team
answered on 01 Apr 2011, 08:36 AM
Hi A. Drost,

I already answered your support ticket on the subject. For convenience I will paste my answer here as well.

This is expected behavior. The problem occurs because the dialog definitions are not loaded if the tools are not registered.

We are working on improvements for RadEditor for better integration with RadRibbonBar. Unfortunately, I am unable to provide firm estimate when they will available.

For the time being, as a workaround for this case I would suggest you to load the tools for the dialogs and then hide the toolbar using the following CSS:
.reToolbarWrapper
{
    display: none;   
}


All the best,
Dobromir
the Telerik team
Tags
Editor
Asked by
A. Drost
Top achievements
Rank 1
Answers by
A. Drost
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or