How To Install CKEditor In Laravel 7

Do you want to install CKEditor in Laravel 7 ? How to install ckeditor in laravel 7 is the today's topic. I will dicuss step by step so that you can add ckeditor in your latest laravel application. 

You know that to write an article we need editor. CKeditor is one of them to use. It is very popular for its large number of plugin and big community. If you don't know how to add ckeditor in laravel 7 application. Don't worry, i will help you.

In this article, we are going to show you how to install and use CKEditor in Laravel 7. Now we are going to show how to add ck editor in laravel 7, so first we have to discuss about Laravel package for CKEditor library. If you wish to use CKEdiotr apart from Laravel, then please check the official website for CKEditor

Read Also : How to Add CKEditor with Image Upload using KCFinder in Laravel

ckeditor for laravel 7

To install CKEditor in Laravel, open the command prompt in your project root directory and run the below command.

composer require unisharp/laravel-ckeditor


Above command will install CKEditor packages in your project’s vendor directory. Next, open your config/app.php and place the below line to the providers array.



After the above steps, run the below command which copies some of the files and folders from ‘vendor\unisharp\laravel-ckeditor’ to ‘public\vendor\unisharp\laravel-ckeditor’.

php artisan vendor:publish --tag=ckeditor


How To Use CKEditor

At this stage, we have completed the steps for installing the CKEditor package. Now let’s see how to use the CKEditor. Let’s say we have a textarea which should get replaced by CKEditor. To do so we are adding id ‘summary-ckeditor’ to the textarea.


Next, we need to include ckeditor.js file and write a JavaScript code which replaces textarea with CKEditor.


Above JavaScript code replaces textarea with the CKEditor. Hope it will work for you.