Monday, February 20, 2012

Image upload with CKEditor.

Image upload with CKEditor.

My latest issue was how to integrate CKFinder for image upload in CKEditor. Here the solution.

1. Download CKEditor and extract in your web folder root.

2. Download CKFinder and extract withing ckeditor folder.

3. Then add references to the CKEditor, CKFinder and put
 <CKEditor:CKEditorControl ID="CKEditorControl1" runat="server"></CKEditor:CKEditorControl>
 to your aspx page.

4. In code behind page OnLoad event add this code snippet

protected override void OnLoad(EventArgs e)
{
CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
_FileBrowser.BasePath = "ckeditor/ckfinder/";
_FileBrowser.SetupCKEditor(CKEditorControl1);
}

5. Edit Confic.ascx file.

public override bool CheckAuthentication()
{
return true;
}

// Perform additional checks for image files.
SecureImageUploads = true;

Thanks

1 comment:

TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...