About CKEditor : CKEditor is a text editor to be used inside web pages.By CKEditor we can change font style,font color and other features found on desktop editing applications like Microsoft Word.By CKEditor we can also upload images but it is touhg if we only use CKEditor.Therefore we need to know about CKFinder.
About CKFinder :
CKFinder is a powerful and easy to use Ajax file manager for web browsers. Its simple interface makes quick to learn for all kinds of users, from advanced professionals to Internet beginners.
How to implement CKEditor and CKFinder :

At first download CKEditor and Ckfinder consecutively from

http://ckeditor.com/download

http://ckfinder.com/download

Then place those folder in your project folder as your wish.
Second step : Then include ckeditor.js from CKEditor in the page whereyou want add the functionality of CKEditor . Like:

<script type=”application/javascript” language=”javascript” src=”../ckeditor/ckeditor.js”></script>

.
This ckeditor.js need the help of jquery library.That means you have to also include latest jquery library page.
Third step : Then You need to include following snippet of code

window.onload = function() {
CKEDITOR.replace( ‘q_desc’,
{
filebrowserBrowseUrl : ‘http://localhost/quiz/ckfinder/ckfinder.html’,
filebrowserImageBrowseUrl : ‘http://localhost/quiz/ckfinder/ckfinder.html?Type=Images’,
filebrowserFlashBrowseUrl : ‘http://localhost/quiz/ckfinder/ckfinder.html?Type=Flash’,
filebrowserUploadUrl : ‘http://localhost/quiz/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&currentFolder=%2F&NewFolderName=MyFolder’,
filebrowserImageUploadUrl : ‘http://localhost/quiz/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images&currentFolder=%2F&NewFolderName=MyFolder1′,
filebrowserFlashUploadUrl : ‘http://localhost/quiz/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash’
});
};

Here CKEDITOR.replace( ‘q_desc’ ) means,CKEditor replace the textarea field by field id name.
Fourth Step: Then open the page named config.php from CKFinder. Edit the function CheckAuthentication() ,which return will be true. Then you can change $baseUrl = ‘/ckfinder/userfiles/’; this line,where all the file will save.

Latest posts by Sahel Aktar

  • Share/Bookmark