How can I use Ckfinder with Ckeditor? -


i used ckeditor in project. worked well. can put picture in texts url. know that,if want upload picture pc, must used ckfinder. how can use ckfinder ckeditor?

i use code call ckeditor:

 protected void page_load(object sender, eventargs e) {     string strscript = "ckeditor.replace( '" + textbox1.clientid + "',{toolbar : 'full'});";     clientscript.registerstartupscript(this.gettype(), "ck-js/ckeditor", strscript, true);  } 

thanks.

it takes 5 minutes complete setup:

  1. download ckeditor , ckfinder.
  2. put extracted code of both in 1 folder inside xampp below.
  3. create index file (index.html) containing editor below code.

    <html> <head> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <script type="text/javascript" src="ckfinder/ckfinder.js"></script> </head> <body>     <h1>ckeditor ckfinder integration using php</h1>     <textarea id="editor1" name="editor1" rows="10" cols="80"></textarea> <script type="text/javascript"> var editor = ckeditor.replace( 'editor1', {     filebrowserbrowseurl : 'ckfinder/ckfinder.html',     filebrowserimagebrowseurl : 'ckfinder/ckfinder.html?type=images',     filebrowserflashbrowseurl : 'ckfinder/ckfinder.html?type=flash',     filebrowseruploadurl : 'ckfinder/core/connector/php/connector.php?command=quickupload&type=files',     filebrowserimageuploadurl : 'ckfinder/core/connector/php/connector.php?command=quickupload&type=images',     filebrowserflashuploadurl : 'ckfinder/core/connector/php/connector.php?command=quickupload&type=flash' }); ckfinder.setupckeditor( editor, '../' ); </script> </body> </html> 

so folder structure this:

 htdocs |_integrated     |_ckeditor     |   |_config.js     |   |_...     |_ckfinder     |   |_config.php     |   |_...     |_uploads     |_index.html 
  1. now open file config.php inside ckfinder & make following changes:

    function checkauthentication() {     return true; } $baseurl = 'http://localhost/integrated/uploads/'; $enabled = true; $config['secureimageuploads'] = false; $config['chmodfolders'] = 0777 ; 
  2. now open url http://localhost/integrated/ , try uploading image.

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -