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

[Solved] ImageBrowser fails to load

1 Answer 107 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roy Halvorsen
Top achievements
Rank 1
Roy Halvorsen asked on 26 May 2011, 11:15 AM
I am having some problems with loading the ImageBrowser. Without the ImageBrowser, the editor works as expected. This is the error I get:
"Microsoft JScript runtime error: Object doesn't support this action". The action is as follows in "telerik.editor.min.js":

new ar.imageBrowser(s(this).find(".t-image-browser"),s.extend(a9,{apply:bb,element:a5.editor.element,localization:a5.editor.localization}))

This is my ImageBrowser Controller:
public class ImageBrowserController :  EditorFileBrowserController
{
    public override string[] ContentPaths
    {
        get
        {
            return new[] { "~/Content/Photos" };
        }
    }
}

And this is the editor:
@( Html.Telerik().EditorFor(x => x.Model.Content)
                        .Name("rtxtEditor")
                        .Localizable("nb-NO")
                        .Tools(tools =>
                            tools.Clear()
                            .Bold()
                            .Italic()
                            .Underline()
                            .Separator()
                            .FontName()
                            .FontSize()
                            .Separator()
                            .JustifyLeft()
                            .JustifyCenter()
                            .JustifyRight()
                            .JustifyFull()
                            .Separator()
                            .InsertUnorderedList()
                            .InsertOrderedList()
                            .Separator()
                            .Outdent()
                            .Indent()
                            .Separator()
                            .CreateLink()
                            .Unlink()
                            .Separator()
                            .InsertImage())
                        .FileBrowser(settings => settings
                        .Browse("Browse", "ImageBrowser")
                        .Upload("Upload", "ImageBrowser")
                        .CreateDirectory("CreateDirectory", "ImageBrowser"))
                    )

I am using version 2011.1.502. Can anyone tell me what's wrong?

1 Answer, 1 is accepted

Sort by
0
Roy Halvorsen
Top achievements
Rank 1
answered on 26 May 2011, 11:38 AM
My fault ... I did not include the correct .js files for the ImageBrowser ...
Tags
Editor
Asked by
Roy Halvorsen
Top achievements
Rank 1
Answers by
Roy Halvorsen
Top achievements
Rank 1
Share this question
or