Image uploading using CKEditor in asp.net mvc -


i using ckeditor in application rich text box. used provide bullets , numbering. need upload images in between text. how can accomplish this? configuraion set? should use ckfinder this? if please detail me on this.

you can try this:

in view.

filebrowserimageuploadurl: '../../upload/uploadnow' 

in controller

public actionresult uploadnow(httppostedfilewrapper upload, string ckeditorfuncnum)     {         string path = "";         string pathweb ="";         if (upload != null)         {             string imagename = upload.filename;             string extention = path.getextension(imagename);             string name = datetime.now.tostring("yymmddhhmmssms");             imagename = name + extention;             pathweb = "/images/uploads/" + imagename;             path = system.io.path.combine(server.mappath("~/images/uploads"), imagename);             upload.saveas(path);             httpcontext.response.write("<script>window.parent.ckeditor.tools.callfunction(" + ckeditorfuncnum + ", \"" + pathweb + "\");</script>");             httpcontext.response.end();         }         return view();     } 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -