How to add ckeditor with image upload in Laravel ?

About Us:

We are from free coder. We are a group of web developers who are passionate about web development. You can learn from us php, laravel, node js, vue js, react js and many other topic on web developement.
we are very happy to help you.
free coder

Today what you are going to learn:

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 lesson laravel ckeditor sample, ckeditor laravel 4, ckeditor laravel 5, laravel rich text editor

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

Lesson 2 : next download kcfinder for image uploading. here : http://kcfinder.sunhater.com/download.

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

Lesson 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 lesson:

// 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';

};

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

<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" class="ckeditor"></textarea>

<script type="text/javascript">

CKEDITOR.replace( 'editor1' );

</script>

</body>

Try this.............

Recent Posts

Related Posts