ImageBrowser with flat kendoui by asp.net AJAX

2 posts, 0 answers
  1. ivan
    ivan avatar
    27 posts
    Member since:
    Aug 2013

    Posted 06 Jan 2014 Link to this post

    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








  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 07 Jan 2014 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top