onlinecode

How to add ckeditor with image upload in Laravel ?

How to add ckeditor with image upload in Laravel ?

In this post we will give you information about How to add ckeditor with image upload in Laravel ?. Hear we will give you detail about How to add ckeditor with image upload in Laravel ?And how to use it also give you demo for it if it is necessary.

if you want to use ckeditor in laravel and you also want to add file uploading as well. if you are use simply in php then it is very simple. but if you are set laravel then you fetch many problem like i also fetch lots of problem.

Now, i will give you few step to set ckeditor with file uploading and you will easily apply this. this is a very simple to browse your image, file etc upload.

use ckeditor in php, use ckeditor in laravel 4, use ckeditor in laravel 5, how to add ckeditor in laravel, laravel ckeditor image upload, laravel ckeditor example, laravel ckeditor sample, ckeditor laravel 4, ckeditor laravel 5, laravel rich text editor

Step 1 : download ckeditor from its official website, i mean here : http://ckeditor.com/download

Step 2 : next download kcfinder for image uploading. here : .

Step 3 : then create new folder like : ‘templateEditor’ in your public directory and put both folder there.(public/templateEditor/ckeditor and public/templateEditor/kcfinder).

Step 4 : open public/templateEditor/ckeditor/config.js and put code as i under :

/**

* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.

* For licensing, see LICENSE.md or http://ckeditor.com/license

*/

CKEDITOR.editorConfig = function(config) {

// Define changes to default configuration here. For example:

// config.language = 'fr';

// config.uiColor = '#AADC6E';

config.filebrowserBrowseUrl = '/templateEditor/kcfinder/browse.php?opener=ckeditor&type=files';

config.filebrowserImageBrowseUrl = '/templateEditor/kcfinder/browse.php?opener=ckeditor&type=images';

config.filebrowserFlashBrowseUrl = '/templateEditor/kcfinder/browse.php?opener=ckeditor&type=flash';

config.filebrowserUploadUrl = '/templateEditor/kcfinder/upload.php?opener=ckeditor&type=files';

config.filebrowserImageUploadUrl = '/templateEditor/kcfinder/upload.php?opener=ckeditor&type=images';

config.filebrowserFlashUploadUrl = '/templateEditor/kcfinder/upload.php?opener=ckeditor&type=flash';

};

Step 5 : add code in your main blade file like as i give you under :

Also see:How to add CKEditor with image upload using KCFinder in PHP Example Code?

<head>

<title>Laravel</title>

<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<script src="/templateEditor/ckeditor/ckeditor.js"></script>

</head>

<body>

<textarea id="editor1" ></textarea>

<script type="text/javascript">

CKEDITOR.replace( 'editor1' );

</script>

</body>

Try this………….

Hope this code and post will helped you for implement How to add ckeditor with image upload in Laravel ?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Exit mobile version