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

ImageBrowser with flat kendoui by asp.net AJAX

1 Answer 118 Views
Editor
This is a migrated thread and some comments may be shown as answers.
ivan
Top achievements
Rank 1
ivan asked on 06 Jan 2014, 09:20 AM
sorry,
I have read all the getstart and api document abount the ImageBrowser, but still can't get it to work.  Maybe I missed something.  

I am use flat kendoui( only js, not for asp.net MVC)
this is my js:
   
jQuery("#Script1").kendoEditor({
  imageBrowser: {
    path: "/KPIupload/OADocument/PublicPhoto/",
    transport: {
       read: "/KPIGetData/FileData.aspx?SearchType=photodocument",
      //destroy: "imagebrowser/destroy",
     //create: "imagebrowser/createDirectory",
     //uploadUrl: "imagebrowser/upload",
     //thumbnailUrl: "imagebrowser/thumbnail",
      imageUrl: "/KPIupload/OADocument/PublicPhoto/{0}"
     }
  },
  tools: [
                                                            "bold",
                                                            "italic",
                                                            "underline",
                                                            "justifyLeft",
                                                            "justifyCenter",
                                                            "createLink",
                                                            "unlink",
                                                            "insertImage",
                                                            "createTable",
                                                            "addRowAbove",
                                                            "addRowBelow",
                                                            "addColumnLeft",
                                                            "addColumnRight",
                                                            "deleteRow",
                                                            "deleteColumn",
                                                            "viewHtml",
                                                            "fontSize",
                                                            "foreColor"
                                                             
 ]
});

The editor works fine, but when I click the image browser, no image is showed.
There are 3 images on the  /KPIupload/OADocument/PublicPhoto/, I am sure of that. In fact, if I don't use ImageBrowser, just use the simple image handle of the editor, I can show the images, that means the images are there.

I see the document, and it said the "read" expects a json, so I test my read url, and found it returns:
[{"name":"111.JPG","type":"f","size":"6832"},{"name":"book2.png","type":"f","size":"9692"},{"name":"BSCTool.png","type":"f","size":"5773"}]
I think it's right.

So, I don't know why it can't show any images.  Maybe I missing something. Need your help!

yours,
Ivan








1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Jan 2014, 04:53 PM
Hello Ivan,

The images, displayed inside the ImageBrowser, depend on the thumbnailUrl property. Why have you commented it out?

The imageUrl is applicable only for the Editor's content area, after an image is confirmed (double-clicked) by the user.

http://demos.kendoui.com/web/editor/imagebrowser.html

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
ivan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or