Need More Info
Last Updated: 15 Sep 2023 08:16 by ADMIN
trinath
Created on: 08 Sep 2023 13:41
Category: Kendo UI for jQuery
Type: Bug Report
0
How to upload the file or image using the kendo Editor in n angularjs

Hello Team , 

we are using  .net mvc + angular js 

i am unable to upload the image from the my desktop, please find the code below 


  scope.createKendoEditor = function(element, value) {
                        //debugger;
                        var k = $(element).kendoEditor({
                            "execute": onExecute,
"imageBrowser": {
                                messages: {

                                    dropFilesHere: "Drop files here",

                                   uploadFile: "Upload a file"
                                },
                            transport: {
                                read: "imagebrowser/read",
                                destroy: "imagebrowser/destroy",
                                create: "imagebrowser/createDirectory",
                                uploadUrl: "imagebrowser/upload",
                                thumbnailUrl: "imagebrowser/thumbnail",
                                imageUrl: "@FPK12.LMS.Framework.Utility.FullyQualifiedApplicationPath" + "/Temp/" + "@Utility.UserSessionID" + "/images/{0}?v="+@DateTime.UtcNow.ToString("MMddyyyyHHmmss")
                            }
                        },
"fileBrowser": {
messages: {
dropFilesHere: "Drop files here",
uploadFile: "Upload a file"
},
transport: {
read: "imagebrowser/read",
destroy: "imagebrowser/destroy",
create: "imagebrowser/createDirectory",
uploadUrl: "imagebrowser/upload",
thumbnailUrl: "imagebrowser/thumbnail",
imageUrl: "@FPK12.LMS.Framework.Utility.FullyQualifiedApplicationPath" + "/Temp/" + "@Utility.UserSessionID" + "/images/{0}?v=" +@DateTime.UtcNow.ToString("MMddyyyyHHmmss")
                            }
},
                            "value": value != null ? WirisPlugin.Parser.initParse(value) : value,
                            "tools": [
                                { "name": "bold" },
                                { "name": "italic" },
                                { "name": "underline" },
                                { "name": "strikethrough" },
                                { "name": "justifyLeft" },
                                { "name": "justifyCenter" },
                                { "name": "justifyRight" },
                                { "name": "justifyFull" },
                                { "name": "insertUnorderedList" },
                                { "name": "insertOrderedList" },
                                { "name": "outdent" },
                                { "name": "indent" },
                                { "name": "createLink" },
                                { "name": "unlink" },
                                { "name": "insertImage" },
                                { "name": "insertFile" },
                                { "name": "subscript" },
                                { "name": "superscript" },
                                { "name": "createTable" },
                                { "name": "addColumnLeft" },
                                { "name": "addColumnRight" },
                                { "name": "addRowAbove" },
                                { "name": "addRowBelow" },
                                { "name": "deleteRow" },
                                { "name": "deleteColumn" },
                                { "name": "viewHtml" },
                                { "name": "foreColor" },
                                { "name": "backColor" },
                                //{ "name": "formatting" },
                                { "name": "fontName" },
                                { "name": "fontSize" },
                                {
                                    name: "wiris",
                                    template: "<div id='" + element.replace("#", "") + "_toolbar'></div>"
                                },
                                {
                                    name: "Media",
                                    template: "<div id='" + element.replace("#", "") + "_media' style='cursor:pointer'>  <img id='imgMedia' style='padding: 12.2px' title='Media' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGqSURBVDhPzdTNK0RRHMbx6yUvUYgsLYmdpFDessUG5Q+QouzssGBvhxUWNuwIC0qJIgvlZcVKKXkpFkjewvc5c++499zLzMLCU585c6Y79/5+Z84Z57+kEnvuGEiaOyaTDBSgGisoxTFeUYsTOKl6STIzuMI65nAPpQLTKDYzX/pwjrsI+XiHKsmDCtHn/cjFC+rhpOiFVGEH47jQB1ZU3QM6odbOcI1hzEOVN2MXJrrwBt4DojIFVfmGWahlVdiDS6iLeLqgG3pRxa3QD+FFD8tBHdTFJ7RMZVB1gdg3nMAHtqEbeJXruiWUY9EdI2PfcBKqQLQteqHY14WSaNtozbawaWaxdTuNvY2OvxVV5e2lUXRgEBvQWrYgC3a0ZfRA7YJ47FZUub96rdsjdI1NN1pDIO3QRi00s3BuoWPWBK8rjQ04gPZkIDqjOiVaI/8JkUZ31GZWe6vQqdCv/AxtdFVq4j1NKUIbss3sO8tQdSM4whhqcIgh6Hv+9U8qankg9tZJR4k7Kt0ItZwoC9CR+4naN/G3/Fu0XfQ/mGlmwWjj7+PJzP42jvMFvddvjvC2MvQAAAAASUVORK5CYII='> </div>"
                                }

                            ]
                        }).data("kendoEditor");

                        setTimeout(function () {
                            if (value == undefined) {
                                $(k).focus();
                            }

                        }, 100);
                        return k;
}   we are getting the web address URL we are expecting upload images/files from the My PC   
1 comment
ADMIN
Ianko
Posted on: 15 Sep 2023 08:16

Hello Trinath,

The rendered Editor component from the snapshot seems to be a different one from the setup showed in the code snippet. The code shown should setup a lot more tools in the toolbar. Whereas the one from the snapshot has different setup. 

Here you are an example of the tools that should be visible with the setup you have (https://dojo.telerik.com/UminiyAd): 

Please, verify that the Editor component you are testing is the one that you are setting up from the code. Otherwise there is the possibility that the Editor component is not getting the setup you are modifying. However, why that might happen is related to the application code and without more details on the code I am unable to make any possible assumption how to fix that.

Regards,
Ianko
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources