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:
- download ckeditor , ckfinder.
- put extracted code of both in 1 folder inside xampp below.
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
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 ;
- now open url
http://localhost/integrated/
, try uploading image.
Comments
Post a Comment