Log in or register to post comments
Last post
alfirus's picture
Joined: 21/03/2012
Posts: 3
CKEditor using CKFinder
I'm using ASP for my web. Now those files (CKEditor and CKFinder) location as below

modules/ckfinder/
plugins/ckeditor/

and my web to use those script is at

media/media.asp

Below is the media.asp codes
<script src="../plugins/ckeditor/sample.js" type="text/javascript"></script>
<link href="../plugins/ckeditor/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var editor = CKEDITOR.replace( 'BlogDetails' );
CKFinder.setupCKEditor( editor, '../modules/ckfinder/' );
CKEDITOR.replace( 'BlogDetails',
{
   filebrowserBrowseUrl : '../modules/ckfinder/ckfinder.html',
   filebrowserImageBrowseUrl : '../modules/ckfinder/ckfinder.html?type=Images',
   filebrowserFlashBrowseUrl : '../modules/ckfinder/ckfinder.html?type=Flash',
   filebrowserUploadUrl : 
       '../modules/ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Files&currentFolder=/archive/',
   filebrowserImageUploadUrl : 
      '../modules/ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Images&currentFolder=/images/',
   filebrowserFlashUploadUrl : '../modules/ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Flash'
});
</script>

I foundout CKEditor didn't have any "Browse Server" button or "Upload" tab when i click image button. Kindly help. Thanks in advance
alfirus's picture
Joined: 21/03/2012
Posts: 3
Re: CKEditor using CKFinder
I found out already.

I included
<script type="text/javascript" src="../plugins/ckeditor/ckeditor.js"></script>
<script src="../plugins/ckeditor/sample.js" type="text/javascript"></script>
<link href="../plugins/ckeditor/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../modules/ckfinder/ckfinder.js"></script>

Before head
Then
<script type="text/javascript">

// This is a check for the CKEditor class. If not defined, the paths must be checked.
if ( typeof CKEDITOR == 'undefined' )
{
   document.write(
      '<strong><span style="color: #ff0000">Error</span>: CKEditor not found</strong>.' +
      'This sample assumes that CKEditor (not included with CKFinder) is installed in' +
      'the "/ckeditor/" path. If you have it installed in a different place, just edit' +
      'this file, changing the wrong paths in the &lt;head&gt; (line 5) and the "BasePath"' +
      'value (line 32).' ) ;
}
else
{
   var editor = CKEDITOR.replace( 'BlogDetails' );

   // Just call CKFinder.setupCKEditor and pass the CKEditor instance as the first argument.
   // The second parameter (optional), is the path for the CKFinder installation (default = "/ckfinder/").
   CKFinder.setupCKEditor( editor, '../modules/ckfinder/' ) ;

   // It is also possible to pass an object with selected CKFinder properties as a second argument.
   // CKFinder.setupCKEditor( editor, { basePath : '../', skin : 'v1' } ) ;
}

      </script>

After the textarea. Rename BlogDetails acording with you textarea ID
alfonsoml's picture
Joined: 31/12/2006
Posts: 3698
Re: CKEditor using CKFinder
You're copying too much from the samples. You don't need that stylesheet of js file as well as the check on CKEDITOR.

You can use just this:
<script type="text/javascript" src="../plugins/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../modules/ckfinder/ckfinder.js"></script>


and
<script type="text/javascript">
       var editor = CKEDITOR.replace( 'BlogDetails' );

       // Just call CKFinder.setupCKEditor and pass the CKEditor instance as the first argument.
       // The second parameter (optional), is the path for the CKFinder installation (default = "/ckfinder/").
       CKFinder.setupCKEditor( editor, '../modules/ckfinder/' ) ;
</script>