Question

In my CkEditor upload image works fine but browse image not working. I integrated CkFinder on to it.

My Razor view:

<script src="@Url.Content("~/Scripts/CKEditor/ckeditor/ckeditor.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/CKEditor/ckfinder/ckfinder.js")" type="text/javascript"></script>

@Html.TextAreaFor(model => model.Content, new { @id = "ckeditor" })

CKEDITOR.replace('ckeditor',
{
    filebrowserImageBrowseUrl: '/Scripts/ckfinder/ckfinder.html?type=Images',
    filebrowserUploadUrl: '/Scripts/ckfinder/core/connector/aspx/connector.aspx?   command=QuickUpload&type=Files',
    filebrowserImageUploadUrl: '/ImageUploader/UploadImage'     
}

For Image upload i used an action it works fine .But Image Browser not works properly. It redirects to ckfinder but not showing Uploaded images also not showing folder.

Was it helpful?

Solution

Used Filemanager for browseing Image instead of ckfinder

In my view

@Html.TextAreaFor(model => model.Content, new { @id = "ckeditor" })


CKEDITOR.replace('ckeditor',
{

 filebrowserImageUploadUrl:'/ImageUploader/UploadImage',//for uploading image 
 filebrowserImageBrowseUrl: '/Scripts/FileManager/index.html'

 }
);

Download Filemanager for ckeditor and specify the folder path in filemanager.aspx.cs inside connector it works great

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top