error Kendo UI editor with imageBrowser “too much recursion”

1 posts, 0 answers
  1. Jorge
    Jorge avatar
    2 posts
    Member since:
    Feb 2012

    Posted 06 May 2014 Link to this post

    I'm using the editor to image gallery of Kendo UI, the editor works fine (links, formats, etc. ..) and upload the photos to the gallery and read a service (rest); the problem is that when wanting to insert any image in the gallery get the error:

    "too much recursion ... ute (i)," string "== typeof r) {try {r =" true "=== r 0:" false "=== r1:" null "r === null: + r ... jquery .... min.js (line 3) "

    The funny thing is that when you remove the configuration "uploadURL", if you insert pictures in the textarea; obviously the plugin no longer gives me the option to upload.

    In the documentation (http://docs.telerik.com/kendo-ui/api/web/editor # configuration-ImageBrowser): did not find details about how to fix it.

    HTML(Razr)

       
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/js/vendor/kendo-ui/kendo.all.min.js"></script>

    <div class="k-content">
      
    <textarea id="KEditor" rows="10" cols="30" placeholder="@GetText("Content")" maxlength="255" style="height: 500px"></textarea>
    </div>



    Js
       
    $(document).ready(function() {
                    $("#KEditor").kendoEditor({
                        tools: [
                            "fontName",
                            "fontSize",
                            "foreColor",
                            "backColor",
                            "bold",
                            "italic",
                            "underline",
                            "justifyLeft",
                            "justifyCenter",
                            "justifyRight",
                            "justifyFull",
                            "insertUnorderedList",
                            "insertOrderedList",
                            "indent",
                            "outdent",
                            "createLink",
                            "unlink",
                            "insertImage",
                            "viewHtml"
                        ],
                        imageBrowser: {
                            transport: {
                                read: {
                                    type: "GET",
                                    url: "/api/sites/user-gallery",
                                },
                                destroy: "/api/sites/user-gallery?action=delete",
                                thumbnailUrl: function(path, name) {
                                    var pictureUrl = decodeURIComponent(name);
                                    return pictureUrl;
                                },
                                uploadUrl: "/api/sites/user-gallery?action=upload", //work if this line is commented
                                imageUrl: function(name) {
                                    var pictureUrl = decodeURIComponent(name);
                                    return pictureUrl;
                                },
                            }
                        }         
                        //, messages: { viewHtml: '@GetText("ViewHtml")'}
                    });
                });


    Json(read rest service):
        {
        "pictureId":1369437,
        "type":"f",
        "size":1024,
    }
Back to Top